diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3ca27e..5ed1b8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,6 +108,11 @@ jobs: needs: build runs-on: ubuntu-latest steps: + - name: Checkout plit (for e2e scripts) + uses: actions/checkout@v4 + with: + sparse-checkout: e2e + - name: Checkout Pipelit (for mock LLM server) uses: actions/checkout@v4 with: @@ -164,13 +169,10 @@ jobs: sys.exit(1) " - - name: Test plit auth login/status/logout + - name: API client E2E tests run: | - ./plit auth login --url http://localhost:8000 --username admin --password testpass123 - ./plit auth status - ./plit auth logout - ./plit auth status 2>&1 | grep -q "Not logged in" - echo "Auth commands passed" + chmod +x e2e/api-client.sh + PIPELIT_URL=http://localhost:8000 PIPELIT_USER=admin PIPELIT_PASS=testpass123 ./e2e/api-client.sh ./plit - name: Auth and send chat message run: | diff --git a/.github/workflows/regenerate-client.yml b/.github/workflows/regenerate-client.yml new file mode 100644 index 0000000..0221d63 --- /dev/null +++ b/.github/workflows/regenerate-client.yml @@ -0,0 +1,101 @@ +name: Regenerate API Client + +on: + # Triggered by Pipelit stable release (repository_dispatch from Pipelit repo) + repository_dispatch: + types: [pipelit-release] + # Or manually + workflow_dispatch: + inputs: + pipelit_version: + description: 'Pipelit version tag (e.g. v0.3.9)' + required: true + +jobs: + regenerate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Determine version + id: version + run: | + if [ "${{ github.event_name }}" = "repository_dispatch" ]; then + VERSION="${{ github.event.client_payload.version }}" + else + VERSION="${{ github.event.inputs.pipelit_version }}" + fi + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + echo "Pipelit version: $VERSION" + + - name: Download OpenAPI spec from release + run: | + gh release download "${{ steps.version.outputs.version }}" \ + --repo theuselessai/Pipelit \ + --pattern "openapi.json" \ + --dir /tmp \ + || { echo "No openapi.json in release, fetching from Docker image..."; \ + docker run --rm -d --name pipelit-spec \ + -p 18000:8000 \ + -e ADMIN_USERNAME=admin \ + -e ADMIN_PASSWORD=specgen \ + ghcr.io/theuselessai/plit:latest; \ + sleep 10; \ + curl -sf http://localhost:18000/openapi.json > /tmp/openapi.json; \ + docker stop pipelit-spec; } + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + + - name: Generate client + run: | + docker run --rm \ + --user "$(id -u):$(id -g)" \ + -v /tmp/openapi.json:/spec/openapi.json:ro \ + -v ${{ github.workspace }}/pipelit-client:/out \ + openapitools/openapi-generator-cli:latest generate \ + -i /spec/openapi.json \ + -g rust \ + -o /out \ + --library reqwest \ + --additional-properties=packageName=pipelit-client,supportAsync=true + + - name: Restore Cargo.toml + run: git checkout pipelit-client/Cargo.toml + + - name: Post-generation fixups + run: | + # Replace broken AnyOf types with serde_json::Value + find pipelit-client/src -name '*.rs' -exec \ + sed -i 's/Option>>/Option/g' {} + + # Remove double_option serde attrs on fixed fields + find pipelit-client/src -name '*.rs' -exec \ + sed -i 's/, default, with = "::serde_with::rust::double_option"//g' {} + + # Clean generator artifacts + rm -rf pipelit-client/.openapi-generator pipelit-client/.travis.yml \ + pipelit-client/git_push.sh pipelit-client/.openapi-generator-ignore + + - name: Format and verify + run: | + cargo fmt --manifest-path pipelit-client/Cargo.toml + cargo build --manifest-path pipelit-client/Cargo.toml + cargo clippy --manifest-path pipelit-client/Cargo.toml -- -D warnings || true + + - name: Create PR + run: | + BRANCH="chore/regenerate-client-${{ steps.version.outputs.version }}" + git checkout -b "$BRANCH" + git add pipelit-client/ + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git commit -m "chore: regenerate pipelit-client from Pipelit ${{ steps.version.outputs.version }}" || exit 0 + git push origin "$BRANCH" + gh pr create \ + --title "chore: regenerate API client for Pipelit ${{ steps.version.outputs.version }}" \ + --body "Auto-generated from Pipelit OpenAPI spec ${{ steps.version.outputs.version }}. Triggered by: ${{ github.event_name }}" \ + --base main + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 3c4ce12..bb9e3a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target +pipelit-client/target .sisyphus/ diff --git a/CLAUDE.md b/CLAUDE.md index 0c3db98..e95d5f4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,6 +6,14 @@ This file provides guidance to Claude Code (claude.ai/code) when working with th **plit** is the CLI and Docker image for the Pipelit ecosystem. It installs two binaries: `plit` (CLI) and `plit-gw` (gateway server). The Docker image bundles everything: plit, plit-gw, Pipelit backend, DragonflyDB, and a React frontend. +## Roadmap & Versioning + +**See `ROADMAP.md`** for the full project milestone plan. + +Milestones use PROJECT version (from `VERSION` file), not component versions. The GitHub project board at https://github.com/orgs/theuselessai/projects/1 tracks project-level milestones. Each component repo (plit, plit-gw, Pipelit) has matching milestones named `vX.Y.0`. + +Current: `PROJECT=0.4.3` | Next: **v0.5.0** (Workflow Creation & API Client) + ## Tools - `gh` CLI is configured and working for GitHub operations (PRs, checks, merges, etc.) diff --git a/Cargo.lock b/Cargo.lock index 00af0d9..ee9feee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1975,6 +1975,18 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pipelit-client" +version = "0.3.9" +dependencies = [ + "reqwest 0.12.28", + "serde", + "serde_json", + "serde_repr", + "serde_with", + "url", +] + [[package]] name = "plain" version = "0.2.3" @@ -1993,6 +2005,7 @@ dependencies = [ "futures-util", "genai", "libc", + "pipelit-client", "plit-gw", "plit-tui", "reqwest 0.12.28", @@ -2696,6 +2709,17 @@ dependencies = [ "serde_core", ] +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" diff --git a/Cargo.toml b/Cargo.toml index 60a74cd..81df82b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,9 @@ reqwest = { version = "0.12", default-features = false, features = ["json", "rus tokio-tungstenite = { version = "0.26", features = ["rustls-tls-webpki-roots"] } futures-util = "0.3" +# Pipelit API client (auto-generated) +pipelit-client = { path = "pipelit-client" } + # Serialization serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/ROADMAP.md b/ROADMAP.md new file mode 100644 index 0000000..a5ad757 --- /dev/null +++ b/ROADMAP.md @@ -0,0 +1,104 @@ +# Roadmap + +Milestones use **PROJECT** version from `VERSION` file. Each component (plit, plit-gw, plit-tui, Pipelit) has its own semver — the PROJECT version is the combined release. + +Current: `PROJECT=0.4.3` | Next: `v0.5.0` + +--- + +## v0.5.0 — Workflow Creation & API Client + +Conversation-first workflow builder. Non-technical users describe what they want, agents build the workflow. + +### Pipelit (backend) + +| Issue | Title | Priority | +|-------|-------|----------| +| [#167](https://github.com/theuselessai/Pipelit/issues/167) | OpenAPI spec versioning + stability contract | P0 | +| [#163](https://github.com/theuselessai/Pipelit/issues/163) | Workflow DSL format spec + server-side parser | P0 | +| [#127](https://github.com/theuselessai/Pipelit/issues/127) | Skill to Workflow — distill skills into deterministic workflows | P1 | +| [#164](https://github.com/theuselessai/Pipelit/issues/164) | Scribe agent — requirements gathering via conversation | P1 | +| [#165](https://github.com/theuselessai/Pipelit/issues/165) | Architect + Gherkin agents — parallel topology and scenario generation | P1 | +| [#166](https://github.com/theuselessai/Pipelit/issues/166) | Builder agent — create workflows via API from verified topology | P1 | + +### plit (CLI) + +| Issue | Title | Priority | +|-------|-------|----------| +| [#17](https://github.com/theuselessai/plit/issues/17) | Auto-generate Rust API client crate from OpenAPI spec | P0 | +| [#18](https://github.com/theuselessai/plit/issues/18) | `plit api` subcommands — CLI wrapper over generated client | P0 | +| [#20](https://github.com/theuselessai/plit/issues/20) | DSL parser in Tela (JSX) for graph-boxes renderer | P1 | +| [#19](https://github.com/theuselessai/plit/issues/19) | Workflow graph visualization in plit-tui | P1 | + +### plit-gw (gateway) + +No work this milestone. + +### Critical path + +``` +Pipelit #167 (OpenAPI versioning) + → plit #17 (generate Rust client) + → plit #18 (plit api subcommands) + +Pipelit #163 (DSL spec) + → plit #20 (JSX DSL parser) + → plit #19 (graph TUI) + → Pipelit #164 (Scribe) + → Pipelit #165 (Architect + Gherkin) + → Pipelit #166 (Builder) ← also needs plit #18 +``` + +### Target VERSION on ship + +``` +PROJECT=0.5.0 +PLIT=0.5.0 +PLIT_GW=0.3.2 (unchanged) +PLIT_TUI=0.2.0 +PIPELIT=0.4.0 +``` + +--- + +## v0.6.0 — Protocol Adapters, Memory & Safety + +### Pipelit + +| Issue | Title | +|-------|-------| +| [#128](https://github.com/theuselessai/Pipelit/issues/128) | Human Confirmation — interrupt_before for manual approval | +| [#129](https://github.com/theuselessai/Pipelit/issues/129) | Meta Agent — observer and manager for agent behavior | +| [#131](https://github.com/theuselessai/Pipelit/issues/131) | Memory Tables — foundation for self-evolving agent | +| [#132](https://github.com/theuselessai/Pipelit/issues/132) | Memory Nodes — read/write agent knowledge | +| [#133](https://github.com/theuselessai/Pipelit/issues/133) | TOTP Verification Node | + +### plit-gw + +| Issue | Title | +|-------|-------| +| [#9](https://github.com/theuselessai/plit-gw/issues/9) | Discord Adapter | +| [#10](https://github.com/theuselessai/plit-gw/issues/10) | Slack Adapter | +| [#11](https://github.com/theuselessai/plit-gw/issues/11) | Email Adapter | +| [#60](https://github.com/theuselessai/plit-gw/issues/60) | Create theuselessai/registry | +| [#61](https://github.com/theuselessai/plit-gw/issues/61) | Create theuselessai/adapters | +| [#64](https://github.com/theuselessai/plit-gw/issues/64) | plit skills/workflows install | +| [#65](https://github.com/theuselessai/plit-gw/issues/65) | plit adapters install | +| [#66](https://github.com/theuselessai/plit-gw/issues/66) | Skills repo cleanup | +| [#34](https://github.com/theuselessai/plit-gw/issues/34) | Full OpenCode server mode integration | +| [#62](https://github.com/theuselessai/plit-gw/issues/62) | Create theuselessai/workflows — workflow template repository | + +--- + +## Shipped + +### v0.4.x (current) + +Alpha + Beta: core security, sandboxed execution, multi-model gateway, Docker deployment, user management, RBAC, E2E CI. + +### Version history + +| PROJECT | PLIT | PLIT_GW | PLIT_TUI | PIPELIT | Date | +|---------|------|---------|----------|---------|------| +| 0.4.3 | 0.4.3 | 0.3.2 | 0.1.2 | 0.3.9 | 2026-03-16 | +| 0.4.0 | 0.4.0 | 0.3.0 | 0.1.0 | 0.3.9 | 2026-03-14 | diff --git a/e2e/api-client.sh b/e2e/api-client.sh new file mode 100755 index 0000000..5c7c743 --- /dev/null +++ b/e2e/api-client.sh @@ -0,0 +1,136 @@ +#!/usr/bin/env bash +set -euo pipefail + +# E2E tests for the generated pipelit-client via plit CLI. +# Requires: running Pipelit at $PIPELIT_URL with admin credentials. +# +# Usage: PIPELIT_URL=http://localhost:8000 PIPELIT_USER=admin PIPELIT_PASS=testpass123 ./e2e/api-client.sh [path-to-plit] + +PLIT="${1:-./target/debug/plit}" +URL="${PIPELIT_URL:-http://localhost:8000}" +USER="${PIPELIT_USER:-admin}" +PASS="${PIPELIT_PASS:-}" +TOKEN="${PIPELIT_TOKEN:-}" + +PASSED=0 +FAILED=0 + +pass() { PASSED=$((PASSED + 1)); echo " PASS: $1"; } +fail() { FAILED=$((FAILED + 1)); echo " FAIL: $1"; } + +echo "=== plit API client E2E tests ===" +echo "URL: $URL" +echo "Binary: $PLIT" +echo "" + +# --- Auth tests --- +echo "--- Auth ---" + +if [ -n "$TOKEN" ]; then + $PLIT auth login --url "$URL" --token "$TOKEN" && pass "auth login --token" || fail "auth login --token" +elif [ -n "$PASS" ]; then + $PLIT auth login --url "$URL" --username "$USER" --password "$PASS" && pass "auth login --password" || fail "auth login --password" +else + echo " SKIP: no PIPELIT_PASS or PIPELIT_TOKEN set" +fi + +OUTPUT=$($PLIT auth status 2>&1) +echo "$OUTPUT" | grep -q "Logged in" && pass "auth status (logged in)" || fail "auth status: $OUTPUT" + +# --- API endpoint tests (via curl using stored token) --- +echo "" +echo "--- API endpoints ---" + +AUTH_JSON="${XDG_CONFIG_HOME:-$HOME/.config}/plit/auth.json" +if [ ! -f "$AUTH_JSON" ]; then + echo " SKIP: no auth.json found at $AUTH_JSON" + exit 1 +fi + +API_TOKEN=$(python3 -c "import json; print(json.load(open('$AUTH_JSON'))['token'])") +API_URL=$(python3 -c "import json; print(json.load(open('$AUTH_JSON'))['pipelit_url'])") + +api() { + curl -sf -H "Authorization: Bearer $API_TOKEN" "$API_URL/api/v1/$1" 2>/dev/null +} + +api_post() { + curl -sf -X POST -H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" -d "$2" "$API_URL/api/v1/$1" 2>/dev/null +} + +# GET /auth/me/ +RESP=$(api "auth/me/") +echo "$RESP" | python3 -c "import json,sys; d=json.load(sys.stdin); assert d['username']" 2>/dev/null \ + && pass "GET /auth/me/" || fail "GET /auth/me/" + +# GET /workflows/ +RESP=$(api "workflows/") +echo "$RESP" | python3 -c "import json,sys; d=json.load(sys.stdin); assert 'items' in d" 2>/dev/null \ + && pass "GET /workflows/" || fail "GET /workflows/" + +# GET /workflows/node-types/ +RESP=$(api "workflows/node-types/") +echo "$RESP" | python3 -c "import json,sys; d=json.load(sys.stdin); assert len(d) > 0" 2>/dev/null \ + && pass "GET /workflows/node-types/" || fail "GET /workflows/node-types/" + +# GET /credentials/ +RESP=$(api "credentials/") +echo "$RESP" | python3 -c "import json,sys; d=json.load(sys.stdin); assert 'items' in d" 2>/dev/null \ + && pass "GET /credentials/" || fail "GET /credentials/" + +# GET /executions/ +RESP=$(api "executions/") +echo "$RESP" | python3 -c "import json,sys; d=json.load(sys.stdin); assert 'items' in d" 2>/dev/null \ + && pass "GET /executions/" || fail "GET /executions/" + +# GET /health +RESP=$(curl -sf "$API_URL/health" 2>/dev/null) +echo "$RESP" | python3 -c "import json,sys; d=json.load(sys.stdin); assert d['status']" 2>/dev/null \ + && pass "GET /health" || fail "GET /health" + +# --- CRUD test: create workflow, add node, add edge, validate, delete --- +echo "" +echo "--- CRUD ---" + +SLUG="e2e-test-$$" + +RESP=$(api_post "workflows/" "{\"name\":\"E2E Test\",\"slug\":\"$SLUG\"}") +echo "$RESP" | python3 -c "import json,sys; d=json.load(sys.stdin); assert d['slug'] == '$SLUG'" 2>/dev/null \ + && pass "POST /workflows/ (create)" || fail "POST /workflows/ (create): $RESP" + +RESP=$(api "workflows/$SLUG/") +echo "$RESP" | python3 -c "import json,sys; d=json.load(sys.stdin); assert d['slug'] == '$SLUG'" 2>/dev/null \ + && pass "GET /workflows/$SLUG/" || fail "GET /workflows/$SLUG/" + +NODE_RESP=$(api_post "workflows/$SLUG/nodes/" "{\"component_type\":\"trigger_manual\",\"label\":\"trigger\",\"position_x\":0,\"position_y\":0}") +NODE_ID=$(echo "$NODE_RESP" | python3 -c "import json,sys; print(json.load(sys.stdin)['id'])" 2>/dev/null) +[ -n "$NODE_ID" ] && pass "POST /nodes/ (create trigger)" || fail "POST /nodes/ (create trigger): $NODE_RESP" + +NODE2_RESP=$(api_post "workflows/$SLUG/nodes/" "{\"component_type\":\"agent\",\"label\":\"agent\",\"position_x\":0,\"position_y\":100}") +NODE2_ID=$(echo "$NODE2_RESP" | python3 -c "import json,sys; print(json.load(sys.stdin)['id'])" 2>/dev/null) +[ -n "$NODE2_ID" ] && pass "POST /nodes/ (create agent)" || fail "POST /nodes/ (create agent): $NODE2_RESP" + +if [ -n "$NODE_ID" ] && [ -n "$NODE2_ID" ]; then + EDGE_RESP=$(api_post "workflows/$SLUG/edges/" "{\"source_node_id\":\"$NODE_ID\",\"target_node_id\":\"$NODE2_ID\",\"edge_type\":\"direct\"}") + echo "$EDGE_RESP" | python3 -c "import json,sys; d=json.load(sys.stdin); assert d['id']" 2>/dev/null \ + && pass "POST /edges/ (create)" || fail "POST /edges/ (create): $EDGE_RESP" +fi + +VALIDATE_RESP=$(curl -sf -X POST -H "Authorization: Bearer $API_TOKEN" "$API_URL/api/v1/workflows/$SLUG/validate/" 2>/dev/null) +[ $? -eq 0 ] && pass "POST /workflows/$SLUG/validate/" || fail "POST /workflows/$SLUG/validate/" + +curl -sf -X DELETE -H "Authorization: Bearer $API_TOKEN" "$API_URL/api/v1/workflows/$SLUG/" > /dev/null 2>&1 \ + && pass "DELETE /workflows/$SLUG/" || fail "DELETE /workflows/$SLUG/" + +# --- Auth logout --- +echo "" +echo "--- Cleanup ---" + +$PLIT auth logout && pass "auth logout" || fail "auth logout" +OUTPUT=$($PLIT auth status 2>&1) +echo "$OUTPUT" | grep -q "Not logged in" && pass "auth status (logged out)" || fail "auth status after logout: $OUTPUT" + +# --- Summary --- +echo "" +echo "=== Results: $PASSED passed, $FAILED failed ===" +[ "$FAILED" -eq 0 ] || exit 1 diff --git a/pipelit-client/.openapi-generator-ignore b/pipelit-client/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/pipelit-client/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/pipelit-client/Cargo.lock b/pipelit-client/Cargo.lock new file mode 100644 index 0000000..9a62cce --- /dev/null +++ b/pipelit-client/Cargo.lock @@ -0,0 +1,1754 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" + +[[package]] +name = "bumpalo" +version = "3.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" + +[[package]] +name = "cc" +version = "1.2.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chrono" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +dependencies = [ + "iana-time-zone", + "num-traits", + "serde", + "windows-link", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "powerfmt", + "serde_core", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-util" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi", + "wasip2", + "wasm-bindgen", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown 0.16.1", + "serde", + "serde_core", +] + +[[package]] +name = "ipnet" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" + +[[package]] +name = "iri-string" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "js-sys" +version = "0.3.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.183" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "num-conv" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pipelit-client" +version = "0.3.9" +dependencies = [ + "reqwest", + "serde", + "serde_json", + "serde_repr", + "serde_with", + "url", +] + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quinn" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" +dependencies = [ + "bytes", + "getrandom 0.3.4", + "lru-slab", + "rand", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.60.2", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "ref-cast" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustls" +version = "0.23.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5414fad8e6907dbdd5bc441a50ae8d6e26151a03b1de04d89a5576de61d01f" +dependencies = [ + "base64", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.13.0", + "schemars 0.9.0", + "schemars 1.2.1", + "serde_core", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3db8978e608f1fe7357e211969fd9abdcae80bac1ba7a3369bb7eb6b404eb65" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "time" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" + +[[package]] +name = "time-macros" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" +dependencies = [ + "cfg-if", + "futures-util", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2578b716f8a7a858b7f02d5bd870c14bf4ddbbcf3a4c05414ba6503640505e3" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e6cc098ea4d3bd6246687de65af3f920c430e236bee1e3bf2e441463f08a02f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/pipelit-client/Cargo.toml b/pipelit-client/Cargo.toml new file mode 100644 index 0000000..f9e2121 --- /dev/null +++ b/pipelit-client/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "pipelit-client" +version = "0.3.9" +edition = "2021" +description = "Auto-generated Rust API client for the Pipelit workflow platform" +license = "Apache-2.0" +# Generated by openapi-generator from Pipelit's OpenAPI spec. +# Do not edit manually — regenerate with: scripts/generate-client.sh + +[dependencies] +serde = { version = "^1.0", features = ["derive"] } +serde_with = { version = "^3.8", default-features = false, features = ["base64", "std", "macros"] } +serde_json = "^1.0" +serde_repr = "^0.1" +url = "^2.5" +reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart", "rustls-tls"] } diff --git a/pipelit-client/README.md b/pipelit-client/README.md new file mode 100644 index 0000000..e3f8c64 --- /dev/null +++ b/pipelit-client/README.md @@ -0,0 +1,246 @@ +# Rust API client for pipelit-client + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + +## Overview + +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. + +- API version: 0.2.0 +- Package version: 0.2.0 +- Generator version: 7.21.0-SNAPSHOT +- Build package: `org.openapitools.codegen.languages.RustClientCodegen` + +## Installation + +Put the package under your project folder in a directory named `pipelit-client` and add the following to `Cargo.toml` under `[dependencies]`: + +``` +pipelit-client = { path = "./pipelit-client" } +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuthApi* | [**me_api_v1_auth_me_get**](docs/AuthApi.md#me_api_v1_auth_me_get) | **GET** /api/v1/auth/me/ | Me +*AuthApi* | [**mfa_disable_api_v1_auth_mfa_disable_post**](docs/AuthApi.md#mfa_disable_api_v1_auth_mfa_disable_post) | **POST** /api/v1/auth/mfa/disable/ | Mfa Disable +*AuthApi* | [**mfa_login_verify_api_v1_auth_mfa_login_verify_post**](docs/AuthApi.md#mfa_login_verify_api_v1_auth_mfa_login_verify_post) | **POST** /api/v1/auth/mfa/login-verify/ | Mfa Login Verify +*AuthApi* | [**mfa_reset_api_v1_auth_mfa_reset_post**](docs/AuthApi.md#mfa_reset_api_v1_auth_mfa_reset_post) | **POST** /api/v1/auth/mfa/reset/ | Mfa Reset +*AuthApi* | [**mfa_setup_api_v1_auth_mfa_setup_post**](docs/AuthApi.md#mfa_setup_api_v1_auth_mfa_setup_post) | **POST** /api/v1/auth/mfa/setup/ | Mfa Setup +*AuthApi* | [**mfa_status_api_v1_auth_mfa_status_get**](docs/AuthApi.md#mfa_status_api_v1_auth_mfa_status_get) | **GET** /api/v1/auth/mfa/status/ | Mfa Status +*AuthApi* | [**mfa_verify_api_v1_auth_mfa_verify_post**](docs/AuthApi.md#mfa_verify_api_v1_auth_mfa_verify_post) | **POST** /api/v1/auth/mfa/verify/ | Mfa Verify +*AuthApi* | [**obtain_token_api_v1_auth_token_post**](docs/AuthApi.md#obtain_token_api_v1_auth_token_post) | **POST** /api/v1/auth/token/ | Obtain Token +*ChatApi* | [**delete_chat_history_api_v1_workflows_slug_chat_history_delete**](docs/ChatApi.md#delete_chat_history_api_v1_workflows_slug_chat_history_delete) | **DELETE** /api/v1/workflows/{slug}/chat/history | Delete Chat History +*ChatApi* | [**delete_chat_history_api_v1_workflows_slug_chat_history_delete_0**](docs/ChatApi.md#delete_chat_history_api_v1_workflows_slug_chat_history_delete_0) | **DELETE** /api/v1/workflows/{slug}/chat/history | Delete Chat History +*ChatApi* | [**get_chat_history_api_v1_workflows_slug_chat_history_get**](docs/ChatApi.md#get_chat_history_api_v1_workflows_slug_chat_history_get) | **GET** /api/v1/workflows/{slug}/chat/history | Get Chat History +*ChatApi* | [**get_chat_history_api_v1_workflows_slug_chat_history_get_0**](docs/ChatApi.md#get_chat_history_api_v1_workflows_slug_chat_history_get_0) | **GET** /api/v1/workflows/{slug}/chat/history | Get Chat History +*ChatApi* | [**send_chat_message_api_v1_workflows_slug_chat_post**](docs/ChatApi.md#send_chat_message_api_v1_workflows_slug_chat_post) | **POST** /api/v1/workflows/{slug}/chat/ | Send Chat Message +*ChatApi* | [**send_chat_message_api_v1_workflows_slug_chat_post_0**](docs/ChatApi.md#send_chat_message_api_v1_workflows_slug_chat_post_0) | **POST** /api/v1/workflows/{slug}/chat/ | Send Chat Message +*CredentialsApi* | [**activate_credential_api_v1_credentials_credential_id_activate_post**](docs/CredentialsApi.md#activate_credential_api_v1_credentials_credential_id_activate_post) | **POST** /api/v1/credentials/{credential_id}/activate/ | Activate Credential +*CredentialsApi* | [**batch_delete_credentials_api_v1_credentials_batch_delete_post**](docs/CredentialsApi.md#batch_delete_credentials_api_v1_credentials_batch_delete_post) | **POST** /api/v1/credentials/batch-delete/ | Batch Delete Credentials +*CredentialsApi* | [**create_credential_api_v1_credentials_post**](docs/CredentialsApi.md#create_credential_api_v1_credentials_post) | **POST** /api/v1/credentials/ | Create Credential +*CredentialsApi* | [**deactivate_credential_api_v1_credentials_credential_id_deactivate_post**](docs/CredentialsApi.md#deactivate_credential_api_v1_credentials_credential_id_deactivate_post) | **POST** /api/v1/credentials/{credential_id}/deactivate/ | Deactivate Credential +*CredentialsApi* | [**delete_credential_api_v1_credentials_credential_id_delete**](docs/CredentialsApi.md#delete_credential_api_v1_credentials_credential_id_delete) | **DELETE** /api/v1/credentials/{credential_id}/ | Delete Credential +*CredentialsApi* | [**get_credential_api_v1_credentials_credential_id_get**](docs/CredentialsApi.md#get_credential_api_v1_credentials_credential_id_get) | **GET** /api/v1/credentials/{credential_id}/ | Get Credential +*CredentialsApi* | [**list_credential_models_api_v1_credentials_credential_id_models_get**](docs/CredentialsApi.md#list_credential_models_api_v1_credentials_credential_id_models_get) | **GET** /api/v1/credentials/{credential_id}/models/ | List Credential Models +*CredentialsApi* | [**list_credentials_api_v1_credentials_get**](docs/CredentialsApi.md#list_credentials_api_v1_credentials_get) | **GET** /api/v1/credentials/ | List Credentials +*CredentialsApi* | [**test_credential_api_v1_credentials_credential_id_test_post**](docs/CredentialsApi.md#test_credential_api_v1_credentials_credential_id_test_post) | **POST** /api/v1/credentials/{credential_id}/test/ | Test Credential +*CredentialsApi* | [**update_credential_api_v1_credentials_credential_id_patch**](docs/CredentialsApi.md#update_credential_api_v1_credentials_credential_id_patch) | **PATCH** /api/v1/credentials/{credential_id}/ | Update Credential +*DefaultApi* | [**health_check_health_get**](docs/DefaultApi.md#health_check_health_get) | **GET** /health | Health Check +*EdgesApi* | [**create_edge_api_v1_workflows_slug_edges_post**](docs/EdgesApi.md#create_edge_api_v1_workflows_slug_edges_post) | **POST** /api/v1/workflows/{slug}/edges/ | Create Edge +*EdgesApi* | [**create_node_api_v1_workflows_slug_nodes_post**](docs/EdgesApi.md#create_node_api_v1_workflows_slug_nodes_post) | **POST** /api/v1/workflows/{slug}/nodes/ | Create Node +*EdgesApi* | [**delete_edge_api_v1_workflows_slug_edges_edge_id_delete**](docs/EdgesApi.md#delete_edge_api_v1_workflows_slug_edges_edge_id_delete) | **DELETE** /api/v1/workflows/{slug}/edges/{edge_id}/ | Delete Edge +*EdgesApi* | [**delete_node_api_v1_workflows_slug_nodes_node_id_delete**](docs/EdgesApi.md#delete_node_api_v1_workflows_slug_nodes_node_id_delete) | **DELETE** /api/v1/workflows/{slug}/nodes/{node_id}/ | Delete Node +*EdgesApi* | [**list_edges_api_v1_workflows_slug_edges_get**](docs/EdgesApi.md#list_edges_api_v1_workflows_slug_edges_get) | **GET** /api/v1/workflows/{slug}/edges/ | List Edges +*EdgesApi* | [**list_nodes_api_v1_workflows_slug_nodes_get**](docs/EdgesApi.md#list_nodes_api_v1_workflows_slug_nodes_get) | **GET** /api/v1/workflows/{slug}/nodes/ | List Nodes +*EdgesApi* | [**schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post**](docs/EdgesApi.md#schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post) | **POST** /api/v1/workflows/{slug}/nodes/{node_id}/schedule/pause/ | Schedule Pause +*EdgesApi* | [**schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post**](docs/EdgesApi.md#schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post) | **POST** /api/v1/workflows/{slug}/nodes/{node_id}/schedule/start/ | Schedule Start +*EdgesApi* | [**schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post**](docs/EdgesApi.md#schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post) | **POST** /api/v1/workflows/{slug}/nodes/{node_id}/schedule/stop/ | Schedule Stop +*EdgesApi* | [**update_edge_api_v1_workflows_slug_edges_edge_id_patch**](docs/EdgesApi.md#update_edge_api_v1_workflows_slug_edges_edge_id_patch) | **PATCH** /api/v1/workflows/{slug}/edges/{edge_id}/ | Update Edge +*EdgesApi* | [**update_node_api_v1_workflows_slug_nodes_node_id_patch**](docs/EdgesApi.md#update_node_api_v1_workflows_slug_nodes_node_id_patch) | **PATCH** /api/v1/workflows/{slug}/nodes/{node_id}/ | Update Node +*EpicsApi* | [**batch_delete_epics_api_v1_epics_batch_delete_post**](docs/EpicsApi.md#batch_delete_epics_api_v1_epics_batch_delete_post) | **POST** /api/v1/epics/batch-delete/ | Batch Delete Epics +*EpicsApi* | [**create_epic_api_v1_epics_post**](docs/EpicsApi.md#create_epic_api_v1_epics_post) | **POST** /api/v1/epics/ | Create Epic +*EpicsApi* | [**delete_epic_api_v1_epics_epic_id_delete**](docs/EpicsApi.md#delete_epic_api_v1_epics_epic_id_delete) | **DELETE** /api/v1/epics/{epic_id}/ | Delete Epic +*EpicsApi* | [**get_epic_api_v1_epics_epic_id_get**](docs/EpicsApi.md#get_epic_api_v1_epics_epic_id_get) | **GET** /api/v1/epics/{epic_id}/ | Get Epic +*EpicsApi* | [**list_epic_tasks_api_v1_epics_epic_id_tasks_get**](docs/EpicsApi.md#list_epic_tasks_api_v1_epics_epic_id_tasks_get) | **GET** /api/v1/epics/{epic_id}/tasks/ | List Epic Tasks +*EpicsApi* | [**list_epics_api_v1_epics_get**](docs/EpicsApi.md#list_epics_api_v1_epics_get) | **GET** /api/v1/epics/ | List Epics +*EpicsApi* | [**update_epic_api_v1_epics_epic_id_patch**](docs/EpicsApi.md#update_epic_api_v1_epics_epic_id_patch) | **PATCH** /api/v1/epics/{epic_id}/ | Update Epic +*ExecutionsApi* | [**batch_delete_executions_api_v1_executions_batch_delete_post**](docs/ExecutionsApi.md#batch_delete_executions_api_v1_executions_batch_delete_post) | **POST** /api/v1/executions/batch-delete/ | Batch Delete Executions +*ExecutionsApi* | [**cancel_execution_api_v1_executions_execution_id_cancel_post**](docs/ExecutionsApi.md#cancel_execution_api_v1_executions_execution_id_cancel_post) | **POST** /api/v1/executions/{execution_id}/cancel/ | Cancel Execution +*ExecutionsApi* | [**get_execution_api_v1_executions_execution_id_get**](docs/ExecutionsApi.md#get_execution_api_v1_executions_execution_id_get) | **GET** /api/v1/executions/{execution_id}/ | Get Execution +*ExecutionsApi* | [**list_executions_api_v1_executions_get**](docs/ExecutionsApi.md#list_executions_api_v1_executions_get) | **GET** /api/v1/executions/ | List Executions +*InboundApi* | [**inbound_webhook_api_v1_inbound_post**](docs/InboundApi.md#inbound_webhook_api_v1_inbound_post) | **POST** /api/v1/inbound | Inbound Webhook +*InboundApi* | [**inbound_webhook_api_v1_inbound_post_0**](docs/InboundApi.md#inbound_webhook_api_v1_inbound_post_0) | **POST** /api/v1/inbound | Inbound Webhook +*ManualApi* | [**execution_status_view_api_v1_executions_execution_id_status_get**](docs/ManualApi.md#execution_status_view_api_v1_executions_execution_id_status_get) | **GET** /api/v1/executions/{execution_id}/status/ | Execution Status View +*ManualApi* | [**manual_execute_view_api_v1_workflows_workflow_slug_execute_post**](docs/ManualApi.md#manual_execute_view_api_v1_workflows_workflow_slug_execute_post) | **POST** /api/v1/workflows/{workflow_slug}/execute/ | Manual Execute View +*MemoriesApi* | [**batch_delete_checkpoints_api_v1_memories_checkpoints_batch_delete_post**](docs/MemoriesApi.md#batch_delete_checkpoints_api_v1_memories_checkpoints_batch_delete_post) | **POST** /api/v1/memories/checkpoints/batch-delete/ | Batch Delete Checkpoints +*MemoriesApi* | [**batch_delete_episodes_api_v1_memories_episodes_batch_delete_post**](docs/MemoriesApi.md#batch_delete_episodes_api_v1_memories_episodes_batch_delete_post) | **POST** /api/v1/memories/episodes/batch-delete/ | Batch Delete Episodes +*MemoriesApi* | [**batch_delete_facts_api_v1_memories_facts_batch_delete_post**](docs/MemoriesApi.md#batch_delete_facts_api_v1_memories_facts_batch_delete_post) | **POST** /api/v1/memories/facts/batch-delete/ | Batch Delete Facts +*MemoriesApi* | [**batch_delete_procedures_api_v1_memories_procedures_batch_delete_post**](docs/MemoriesApi.md#batch_delete_procedures_api_v1_memories_procedures_batch_delete_post) | **POST** /api/v1/memories/procedures/batch-delete/ | Batch Delete Procedures +*MemoriesApi* | [**batch_delete_users_api_v1_memories_users_batch_delete_post**](docs/MemoriesApi.md#batch_delete_users_api_v1_memories_users_batch_delete_post) | **POST** /api/v1/memories/users/batch-delete/ | Batch Delete Users +*MemoriesApi* | [**list_checkpoints_api_v1_memories_checkpoints_get**](docs/MemoriesApi.md#list_checkpoints_api_v1_memories_checkpoints_get) | **GET** /api/v1/memories/checkpoints/ | List Checkpoints +*MemoriesApi* | [**list_episodes_api_v1_memories_episodes_get**](docs/MemoriesApi.md#list_episodes_api_v1_memories_episodes_get) | **GET** /api/v1/memories/episodes/ | List Episodes +*MemoriesApi* | [**list_facts_api_v1_memories_facts_get**](docs/MemoriesApi.md#list_facts_api_v1_memories_facts_get) | **GET** /api/v1/memories/facts/ | List Facts +*MemoriesApi* | [**list_procedures_api_v1_memories_procedures_get**](docs/MemoriesApi.md#list_procedures_api_v1_memories_procedures_get) | **GET** /api/v1/memories/procedures/ | List Procedures +*MemoriesApi* | [**list_users_api_v1_memories_users_get**](docs/MemoriesApi.md#list_users_api_v1_memories_users_get) | **GET** /api/v1/memories/users/ | List Users +*NodesApi* | [**create_edge_api_v1_workflows_slug_edges_post**](docs/NodesApi.md#create_edge_api_v1_workflows_slug_edges_post) | **POST** /api/v1/workflows/{slug}/edges/ | Create Edge +*NodesApi* | [**create_node_api_v1_workflows_slug_nodes_post**](docs/NodesApi.md#create_node_api_v1_workflows_slug_nodes_post) | **POST** /api/v1/workflows/{slug}/nodes/ | Create Node +*NodesApi* | [**delete_edge_api_v1_workflows_slug_edges_edge_id_delete**](docs/NodesApi.md#delete_edge_api_v1_workflows_slug_edges_edge_id_delete) | **DELETE** /api/v1/workflows/{slug}/edges/{edge_id}/ | Delete Edge +*NodesApi* | [**delete_node_api_v1_workflows_slug_nodes_node_id_delete**](docs/NodesApi.md#delete_node_api_v1_workflows_slug_nodes_node_id_delete) | **DELETE** /api/v1/workflows/{slug}/nodes/{node_id}/ | Delete Node +*NodesApi* | [**list_edges_api_v1_workflows_slug_edges_get**](docs/NodesApi.md#list_edges_api_v1_workflows_slug_edges_get) | **GET** /api/v1/workflows/{slug}/edges/ | List Edges +*NodesApi* | [**list_nodes_api_v1_workflows_slug_nodes_get**](docs/NodesApi.md#list_nodes_api_v1_workflows_slug_nodes_get) | **GET** /api/v1/workflows/{slug}/nodes/ | List Nodes +*NodesApi* | [**schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post**](docs/NodesApi.md#schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post) | **POST** /api/v1/workflows/{slug}/nodes/{node_id}/schedule/pause/ | Schedule Pause +*NodesApi* | [**schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post**](docs/NodesApi.md#schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post) | **POST** /api/v1/workflows/{slug}/nodes/{node_id}/schedule/start/ | Schedule Start +*NodesApi* | [**schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post**](docs/NodesApi.md#schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post) | **POST** /api/v1/workflows/{slug}/nodes/{node_id}/schedule/stop/ | Schedule Stop +*NodesApi* | [**update_edge_api_v1_workflows_slug_edges_edge_id_patch**](docs/NodesApi.md#update_edge_api_v1_workflows_slug_edges_edge_id_patch) | **PATCH** /api/v1/workflows/{slug}/edges/{edge_id}/ | Update Edge +*NodesApi* | [**update_node_api_v1_workflows_slug_nodes_node_id_patch**](docs/NodesApi.md#update_node_api_v1_workflows_slug_nodes_node_id_patch) | **PATCH** /api/v1/workflows/{slug}/nodes/{node_id}/ | Update Node +*SchedulesApi* | [**batch_delete_schedules_api_v1_schedules_batch_delete_post**](docs/SchedulesApi.md#batch_delete_schedules_api_v1_schedules_batch_delete_post) | **POST** /api/v1/schedules/batch-delete/ | Batch Delete Schedules +*SchedulesApi* | [**create_schedule_api_v1_schedules_post**](docs/SchedulesApi.md#create_schedule_api_v1_schedules_post) | **POST** /api/v1/schedules/ | Create Schedule +*SchedulesApi* | [**delete_schedule_api_v1_schedules_job_id_delete**](docs/SchedulesApi.md#delete_schedule_api_v1_schedules_job_id_delete) | **DELETE** /api/v1/schedules/{job_id}/ | Delete Schedule +*SchedulesApi* | [**get_schedule_api_v1_schedules_job_id_get**](docs/SchedulesApi.md#get_schedule_api_v1_schedules_job_id_get) | **GET** /api/v1/schedules/{job_id}/ | Get Schedule +*SchedulesApi* | [**list_schedules_api_v1_schedules_get**](docs/SchedulesApi.md#list_schedules_api_v1_schedules_get) | **GET** /api/v1/schedules/ | List Schedules +*SchedulesApi* | [**pause_schedule_api_v1_schedules_job_id_pause_post**](docs/SchedulesApi.md#pause_schedule_api_v1_schedules_job_id_pause_post) | **POST** /api/v1/schedules/{job_id}/pause/ | Pause Schedule +*SchedulesApi* | [**resume_schedule_api_v1_schedules_job_id_resume_post**](docs/SchedulesApi.md#resume_schedule_api_v1_schedules_job_id_resume_post) | **POST** /api/v1/schedules/{job_id}/resume/ | Resume Schedule +*SchedulesApi* | [**update_schedule_api_v1_schedules_job_id_patch**](docs/SchedulesApi.md#update_schedule_api_v1_schedules_job_id_patch) | **PATCH** /api/v1/schedules/{job_id}/ | Update Schedule +*SettingsApi* | [**get_settings_api_v1_settings_get**](docs/SettingsApi.md#get_settings_api_v1_settings_get) | **GET** /api/v1/settings/ | Get Settings +*SettingsApi* | [**recheck_environment_api_v1_settings_recheck_environment_post**](docs/SettingsApi.md#recheck_environment_api_v1_settings_recheck_environment_post) | **POST** /api/v1/settings/recheck-environment/ | Recheck Environment +*SettingsApi* | [**update_settings_api_v1_settings_patch**](docs/SettingsApi.md#update_settings_api_v1_settings_patch) | **PATCH** /api/v1/settings/ | Update Settings +*TasksApi* | [**batch_delete_tasks_api_v1_tasks_batch_delete_post**](docs/TasksApi.md#batch_delete_tasks_api_v1_tasks_batch_delete_post) | **POST** /api/v1/tasks/batch-delete/ | Batch Delete Tasks +*TasksApi* | [**create_task_api_v1_tasks_post**](docs/TasksApi.md#create_task_api_v1_tasks_post) | **POST** /api/v1/tasks/ | Create Task +*TasksApi* | [**delete_task_api_v1_tasks_task_id_delete**](docs/TasksApi.md#delete_task_api_v1_tasks_task_id_delete) | **DELETE** /api/v1/tasks/{task_id}/ | Delete Task +*TasksApi* | [**get_task_api_v1_tasks_task_id_get**](docs/TasksApi.md#get_task_api_v1_tasks_task_id_get) | **GET** /api/v1/tasks/{task_id}/ | Get Task +*TasksApi* | [**list_tasks_api_v1_tasks_get**](docs/TasksApi.md#list_tasks_api_v1_tasks_get) | **GET** /api/v1/tasks/ | List Tasks +*TasksApi* | [**update_task_api_v1_tasks_task_id_patch**](docs/TasksApi.md#update_task_api_v1_tasks_task_id_patch) | **PATCH** /api/v1/tasks/{task_id}/ | Update Task +*UsersApi* | [**create_own_key_api_v1_users_me_keys_post**](docs/UsersApi.md#create_own_key_api_v1_users_me_keys_post) | **POST** /api/v1/users/me/keys | Create Own Key +*UsersApi* | [**create_user_api_v1_users_post**](docs/UsersApi.md#create_user_api_v1_users_post) | **POST** /api/v1/users/ | Create User +*UsersApi* | [**create_user_key_api_v1_users_user_id_keys_post**](docs/UsersApi.md#create_user_key_api_v1_users_user_id_keys_post) | **POST** /api/v1/users/{user_id}/keys | Create User Key +*UsersApi* | [**delete_user_api_v1_users_user_id_delete**](docs/UsersApi.md#delete_user_api_v1_users_user_id_delete) | **DELETE** /api/v1/users/{user_id} | Delete User +*UsersApi* | [**get_own_profile_api_v1_users_me_get**](docs/UsersApi.md#get_own_profile_api_v1_users_me_get) | **GET** /api/v1/users/me | Get Own Profile +*UsersApi* | [**get_user_api_v1_users_user_id_get**](docs/UsersApi.md#get_user_api_v1_users_user_id_get) | **GET** /api/v1/users/{user_id} | Get User +*UsersApi* | [**list_own_keys_api_v1_users_me_keys_get**](docs/UsersApi.md#list_own_keys_api_v1_users_me_keys_get) | **GET** /api/v1/users/me/keys | List Own Keys +*UsersApi* | [**list_user_keys_api_v1_users_user_id_keys_get**](docs/UsersApi.md#list_user_keys_api_v1_users_user_id_keys_get) | **GET** /api/v1/users/{user_id}/keys | List User Keys +*UsersApi* | [**list_users_api_v1_users_get**](docs/UsersApi.md#list_users_api_v1_users_get) | **GET** /api/v1/users/ | List Users +*UsersApi* | [**revoke_own_key_api_v1_users_me_keys_key_id_delete**](docs/UsersApi.md#revoke_own_key_api_v1_users_me_keys_key_id_delete) | **DELETE** /api/v1/users/me/keys/{key_id} | Revoke Own Key +*UsersApi* | [**revoke_user_key_api_v1_users_user_id_keys_key_id_delete**](docs/UsersApi.md#revoke_user_key_api_v1_users_user_id_keys_key_id_delete) | **DELETE** /api/v1/users/{user_id}/keys/{key_id} | Revoke User Key +*UsersApi* | [**update_own_profile_api_v1_users_me_patch**](docs/UsersApi.md#update_own_profile_api_v1_users_me_patch) | **PATCH** /api/v1/users/me | Update Own Profile +*UsersApi* | [**update_user_api_v1_users_user_id_patch**](docs/UsersApi.md#update_user_api_v1_users_user_id_patch) | **PATCH** /api/v1/users/{user_id} | Update User +*WorkflowsApi* | [**batch_delete_workflows_api_v1_workflows_batch_delete_post**](docs/WorkflowsApi.md#batch_delete_workflows_api_v1_workflows_batch_delete_post) | **POST** /api/v1/workflows/batch-delete/ | Batch Delete Workflows +*WorkflowsApi* | [**create_workflow_api_v1_workflows_post**](docs/WorkflowsApi.md#create_workflow_api_v1_workflows_post) | **POST** /api/v1/workflows/ | Create Workflow +*WorkflowsApi* | [**delete_workflow_api_v1_workflows_slug_delete**](docs/WorkflowsApi.md#delete_workflow_api_v1_workflows_slug_delete) | **DELETE** /api/v1/workflows/{slug}/ | Delete Workflow +*WorkflowsApi* | [**get_workflow_detail_api_v1_workflows_slug_get**](docs/WorkflowsApi.md#get_workflow_detail_api_v1_workflows_slug_get) | **GET** /api/v1/workflows/{slug}/ | Get Workflow Detail +*WorkflowsApi* | [**list_node_types_api_v1_workflows_node_types_get**](docs/WorkflowsApi.md#list_node_types_api_v1_workflows_node_types_get) | **GET** /api/v1/workflows/node-types/ | List Node Types +*WorkflowsApi* | [**list_workflows_api_v1_workflows_get**](docs/WorkflowsApi.md#list_workflows_api_v1_workflows_get) | **GET** /api/v1/workflows/ | List Workflows +*WorkflowsApi* | [**update_workflow_api_v1_workflows_slug_patch**](docs/WorkflowsApi.md#update_workflow_api_v1_workflows_slug_patch) | **PATCH** /api/v1/workflows/{slug}/ | Update Workflow +*WorkflowsApi* | [**validate_dsl_endpoint_api_v1_workflows_validate_dsl_post**](docs/WorkflowsApi.md#validate_dsl_endpoint_api_v1_workflows_validate_dsl_post) | **POST** /api/v1/workflows/validate-dsl/ | Validate Dsl Endpoint +*WorkflowsApi* | [**validate_workflow_api_v1_workflows_slug_validate_post**](docs/WorkflowsApi.md#validate_workflow_api_v1_workflows_slug_validate_post) | **POST** /api/v1/workflows/{slug}/validate/ | Validate Workflow +*WorkspacesApi* | [**batch_delete_workspaces_api_v1_workspaces_batch_delete_post**](docs/WorkspacesApi.md#batch_delete_workspaces_api_v1_workspaces_batch_delete_post) | **POST** /api/v1/workspaces/batch-delete/ | Batch Delete Workspaces +*WorkspacesApi* | [**create_workspace_api_v1_workspaces_post**](docs/WorkspacesApi.md#create_workspace_api_v1_workspaces_post) | **POST** /api/v1/workspaces/ | Create Workspace +*WorkspacesApi* | [**delete_workspace_api_v1_workspaces_workspace_id_delete**](docs/WorkspacesApi.md#delete_workspace_api_v1_workspaces_workspace_id_delete) | **DELETE** /api/v1/workspaces/{workspace_id}/ | Delete Workspace +*WorkspacesApi* | [**get_workspace_api_v1_workspaces_workspace_id_get**](docs/WorkspacesApi.md#get_workspace_api_v1_workspaces_workspace_id_get) | **GET** /api/v1/workspaces/{workspace_id}/ | Get Workspace +*WorkspacesApi* | [**list_workspaces_api_v1_workspaces_get**](docs/WorkspacesApi.md#list_workspaces_api_v1_workspaces_get) | **GET** /api/v1/workspaces/ | List Workspaces +*WorkspacesApi* | [**reset_rootfs_api_v1_workspaces_workspace_id_reset_rootfs_post**](docs/WorkspacesApi.md#reset_rootfs_api_v1_workspaces_workspace_id_reset_rootfs_post) | **POST** /api/v1/workspaces/{workspace_id}/reset-rootfs/ | Reset Rootfs +*WorkspacesApi* | [**reset_workspace_api_v1_workspaces_workspace_id_reset_post**](docs/WorkspacesApi.md#reset_workspace_api_v1_workspaces_workspace_id_reset_post) | **POST** /api/v1/workspaces/{workspace_id}/reset/ | Reset Workspace +*WorkspacesApi* | [**update_workspace_api_v1_workspaces_workspace_id_patch**](docs/WorkspacesApi.md#update_workspace_api_v1_workspaces_workspace_id_patch) | **PATCH** /api/v1/workspaces/{workspace_id}/ | Update Workspace + + +## Documentation For Models + + - [ApiKeyCreateIn](docs/ApiKeyCreateIn.md) + - [ApiKeyCreatedOut](docs/ApiKeyCreatedOut.md) + - [ApiKeyOut](docs/ApiKeyOut.md) + - [BatchDeleteCheckpointsIn](docs/BatchDeleteCheckpointsIn.md) + - [BatchDeleteCredentialsIn](docs/BatchDeleteCredentialsIn.md) + - [BatchDeleteEpicsIn](docs/BatchDeleteEpicsIn.md) + - [BatchDeleteEpisodesIn](docs/BatchDeleteEpisodesIn.md) + - [BatchDeleteExecutionsIn](docs/BatchDeleteExecutionsIn.md) + - [BatchDeleteFactsIn](docs/BatchDeleteFactsIn.md) + - [BatchDeleteProceduresIn](docs/BatchDeleteProceduresIn.md) + - [BatchDeleteSchedulesIn](docs/BatchDeleteSchedulesIn.md) + - [BatchDeleteTasksIn](docs/BatchDeleteTasksIn.md) + - [BatchDeleteUsersIn](docs/BatchDeleteUsersIn.md) + - [BatchDeleteWorkflowsIn](docs/BatchDeleteWorkflowsIn.md) + - [BatchDeleteWorkspacesIn](docs/BatchDeleteWorkspacesIn.md) + - [CapabilitiesInfo](docs/CapabilitiesInfo.md) + - [ChatMessageIn](docs/ChatMessageIn.md) + - [ChatMessageOut](docs/ChatMessageOut.md) + - [ComponentConfigData](docs/ComponentConfigData.md) + - [CredentialIn](docs/CredentialIn.md) + - [CredentialModelOut](docs/CredentialModelOut.md) + - [CredentialOut](docs/CredentialOut.md) + - [CredentialTestOut](docs/CredentialTestOut.md) + - [CredentialUpdate](docs/CredentialUpdate.md) + - [Detail](docs/Detail.md) + - [EdgeIn](docs/EdgeIn.md) + - [EdgeOut](docs/EdgeOut.md) + - [EdgeUpdate](docs/EdgeUpdate.md) + - [EnvironmentInfo](docs/EnvironmentInfo.md) + - [EpicCreate](docs/EpicCreate.md) + - [EpicOut](docs/EpicOut.md) + - [EpicUpdate](docs/EpicUpdate.md) + - [ExecutionDetailOut](docs/ExecutionDetailOut.md) + - [ExecutionLogOut](docs/ExecutionLogOut.md) + - [ExecutionOut](docs/ExecutionOut.md) + - [GateResult](docs/GateResult.md) + - [GatewayInboundMessage](docs/GatewayInboundMessage.md) + - [HttpValidationError](docs/HttpValidationError.md) + - [InboundAttachment](docs/InboundAttachment.md) + - [InboundSource](docs/InboundSource.md) + - [LocationInner](docs/LocationInner.md) + - [ManualExecuteIn](docs/ManualExecuteIn.md) + - [MeResponse](docs/MeResponse.md) + - [MfaDisableRequest](docs/MfaDisableRequest.md) + - [MfaLoginVerifyRequest](docs/MfaLoginVerifyRequest.md) + - [MfaSetupResponse](docs/MfaSetupResponse.md) + - [MfaStatusResponse](docs/MfaStatusResponse.md) + - [MfaVerifyRequest](docs/MfaVerifyRequest.md) + - [NetworkInfo](docs/NetworkInfo.md) + - [NodeIn](docs/NodeIn.md) + - [NodeOut](docs/NodeOut.md) + - [NodeUpdate](docs/NodeUpdate.md) + - [PlatformConfigOut](docs/PlatformConfigOut.md) + - [RuntimeInfo](docs/RuntimeInfo.md) + - [ScheduleJobInfo](docs/ScheduleJobInfo.md) + - [ScheduledJobCreate](docs/ScheduledJobCreate.md) + - [ScheduledJobOut](docs/ScheduledJobOut.md) + - [ScheduledJobUpdate](docs/ScheduledJobUpdate.md) + - [SelfUpdateIn](docs/SelfUpdateIn.md) + - [SettingsResponse](docs/SettingsResponse.md) + - [SettingsUpdate](docs/SettingsUpdate.md) + - [SettingsUpdateResponse](docs/SettingsUpdateResponse.md) + - [ShellToolInfo](docs/ShellToolInfo.md) + - [TaskCreate](docs/TaskCreate.md) + - [TaskOut](docs/TaskOut.md) + - [TaskUpdate](docs/TaskUpdate.md) + - [TokenRequest](docs/TokenRequest.md) + - [TokenResponse](docs/TokenResponse.md) + - [UserCreateIn](docs/UserCreateIn.md) + - [UserInfo](docs/UserInfo.md) + - [UserListOut](docs/UserListOut.md) + - [UserOut](docs/UserOut.md) + - [UserUpdateIn](docs/UserUpdateIn.md) + - [ValidateDslIn](docs/ValidateDslIn.md) + - [ValidationError](docs/ValidationError.md) + - [WorkflowDetailOut](docs/WorkflowDetailOut.md) + - [WorkflowIn](docs/WorkflowIn.md) + - [WorkflowOut](docs/WorkflowOut.md) + - [WorkflowUpdate](docs/WorkflowUpdate.md) + - [WorkspaceEnvVar](docs/WorkspaceEnvVar.md) + - [WorkspaceIn](docs/WorkspaceIn.md) + - [WorkspaceOut](docs/WorkspaceOut.md) + - [WorkspaceUpdate](docs/WorkspaceUpdate.md) + + +To get access to the crate's generated documentation, use: + +``` +cargo doc --open +``` + +## Author + + + diff --git a/pipelit-client/docs/ApiKeyCreateIn.md b/pipelit-client/docs/ApiKeyCreateIn.md new file mode 100644 index 0000000..4610186 --- /dev/null +++ b/pipelit-client/docs/ApiKeyCreateIn.md @@ -0,0 +1,12 @@ +# ApiKeyCreateIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | +**expires_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ApiKeyCreatedOut.md b/pipelit-client/docs/ApiKeyCreatedOut.md new file mode 100644 index 0000000..c01b1f7 --- /dev/null +++ b/pipelit-client/docs/ApiKeyCreatedOut.md @@ -0,0 +1,18 @@ +# ApiKeyCreatedOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **i32** | | +**name** | **String** | | +**prefix** | **String** | | +**created_at** | **String** | | +**last_used_at** | Option<**String**> | | [optional] +**expires_at** | Option<**String**> | | [optional] +**is_active** | **bool** | | +**key** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ApiKeyOut.md b/pipelit-client/docs/ApiKeyOut.md new file mode 100644 index 0000000..a0f191f --- /dev/null +++ b/pipelit-client/docs/ApiKeyOut.md @@ -0,0 +1,17 @@ +# ApiKeyOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **i32** | | +**name** | **String** | | +**prefix** | **String** | | +**created_at** | **String** | | +**last_used_at** | Option<**String**> | | [optional] +**expires_at** | Option<**String**> | | [optional] +**is_active** | **bool** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/AuthApi.md b/pipelit-client/docs/AuthApi.md new file mode 100644 index 0000000..09104d1 --- /dev/null +++ b/pipelit-client/docs/AuthApi.md @@ -0,0 +1,240 @@ +# \AuthApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**me_api_v1_auth_me_get**](AuthApi.md#me_api_v1_auth_me_get) | **GET** /api/v1/auth/me/ | Me +[**mfa_disable_api_v1_auth_mfa_disable_post**](AuthApi.md#mfa_disable_api_v1_auth_mfa_disable_post) | **POST** /api/v1/auth/mfa/disable/ | Mfa Disable +[**mfa_login_verify_api_v1_auth_mfa_login_verify_post**](AuthApi.md#mfa_login_verify_api_v1_auth_mfa_login_verify_post) | **POST** /api/v1/auth/mfa/login-verify/ | Mfa Login Verify +[**mfa_reset_api_v1_auth_mfa_reset_post**](AuthApi.md#mfa_reset_api_v1_auth_mfa_reset_post) | **POST** /api/v1/auth/mfa/reset/ | Mfa Reset +[**mfa_setup_api_v1_auth_mfa_setup_post**](AuthApi.md#mfa_setup_api_v1_auth_mfa_setup_post) | **POST** /api/v1/auth/mfa/setup/ | Mfa Setup +[**mfa_status_api_v1_auth_mfa_status_get**](AuthApi.md#mfa_status_api_v1_auth_mfa_status_get) | **GET** /api/v1/auth/mfa/status/ | Mfa Status +[**mfa_verify_api_v1_auth_mfa_verify_post**](AuthApi.md#mfa_verify_api_v1_auth_mfa_verify_post) | **POST** /api/v1/auth/mfa/verify/ | Mfa Verify +[**obtain_token_api_v1_auth_token_post**](AuthApi.md#obtain_token_api_v1_auth_token_post) | **POST** /api/v1/auth/token/ | Obtain Token + + + +## me_api_v1_auth_me_get + +> models::MeResponse me_api_v1_auth_me_get() +Me + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::MeResponse**](MeResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## mfa_disable_api_v1_auth_mfa_disable_post + +> models::MfaStatusResponse mfa_disable_api_v1_auth_mfa_disable_post(mfa_disable_request) +Mfa Disable + +Disable MFA after verifying a TOTP code. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**mfa_disable_request** | [**MfaDisableRequest**](MfaDisableRequest.md) | | [required] | + +### Return type + +[**models::MfaStatusResponse**](MFAStatusResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## mfa_login_verify_api_v1_auth_mfa_login_verify_post + +> models::TokenResponse mfa_login_verify_api_v1_auth_mfa_login_verify_post(mfa_login_verify_request) +Mfa Login Verify + +Complete MFA login — accepts username + TOTP code, issues API key. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**mfa_login_verify_request** | [**MfaLoginVerifyRequest**](MfaLoginVerifyRequest.md) | | [required] | + +### Return type + +[**models::TokenResponse**](TokenResponse.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) + + +## mfa_reset_api_v1_auth_mfa_reset_post + +> models::MfaStatusResponse mfa_reset_api_v1_auth_mfa_reset_post() +Mfa Reset + +Emergency MFA reset — only allowed from loopback addresses. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::MfaStatusResponse**](MFAStatusResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## mfa_setup_api_v1_auth_mfa_setup_post + +> models::MfaSetupResponse mfa_setup_api_v1_auth_mfa_setup_post() +Mfa Setup + +Generate a TOTP secret. Does NOT enable MFA until /mfa/verify/ is called. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::MfaSetupResponse**](MFASetupResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## mfa_status_api_v1_auth_mfa_status_get + +> models::MfaStatusResponse mfa_status_api_v1_auth_mfa_status_get() +Mfa Status + +Return current MFA status. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::MfaStatusResponse**](MFAStatusResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## mfa_verify_api_v1_auth_mfa_verify_post + +> models::MfaStatusResponse mfa_verify_api_v1_auth_mfa_verify_post(mfa_verify_request) +Mfa Verify + +Verify a TOTP code and enable MFA on the account. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**mfa_verify_request** | [**MfaVerifyRequest**](MfaVerifyRequest.md) | | [required] | + +### Return type + +[**models::MfaStatusResponse**](MFAStatusResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## obtain_token_api_v1_auth_token_post + +> models::TokenResponse obtain_token_api_v1_auth_token_post(token_request) +Obtain Token + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**token_request** | [**TokenRequest**](TokenRequest.md) | | [required] | + +### Return type + +[**models::TokenResponse**](TokenResponse.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/pipelit-client/docs/BatchDeleteCheckpointsIn.md b/pipelit-client/docs/BatchDeleteCheckpointsIn.md new file mode 100644 index 0000000..a1cffa4 --- /dev/null +++ b/pipelit-client/docs/BatchDeleteCheckpointsIn.md @@ -0,0 +1,12 @@ +# BatchDeleteCheckpointsIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**thread_ids** | Option<**Vec**> | | [optional] +**checkpoint_ids** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/BatchDeleteCredentialsIn.md b/pipelit-client/docs/BatchDeleteCredentialsIn.md new file mode 100644 index 0000000..f63c10b --- /dev/null +++ b/pipelit-client/docs/BatchDeleteCredentialsIn.md @@ -0,0 +1,11 @@ +# BatchDeleteCredentialsIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ids** | **Vec** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/BatchDeleteEpicsIn.md b/pipelit-client/docs/BatchDeleteEpicsIn.md new file mode 100644 index 0000000..c1dcc1b --- /dev/null +++ b/pipelit-client/docs/BatchDeleteEpicsIn.md @@ -0,0 +1,11 @@ +# BatchDeleteEpicsIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**epic_ids** | **Vec** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/BatchDeleteEpisodesIn.md b/pipelit-client/docs/BatchDeleteEpisodesIn.md new file mode 100644 index 0000000..425dcea --- /dev/null +++ b/pipelit-client/docs/BatchDeleteEpisodesIn.md @@ -0,0 +1,11 @@ +# BatchDeleteEpisodesIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ids** | **Vec** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/BatchDeleteExecutionsIn.md b/pipelit-client/docs/BatchDeleteExecutionsIn.md new file mode 100644 index 0000000..062b007 --- /dev/null +++ b/pipelit-client/docs/BatchDeleteExecutionsIn.md @@ -0,0 +1,11 @@ +# BatchDeleteExecutionsIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**execution_ids** | **Vec** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/BatchDeleteFactsIn.md b/pipelit-client/docs/BatchDeleteFactsIn.md new file mode 100644 index 0000000..beaf415 --- /dev/null +++ b/pipelit-client/docs/BatchDeleteFactsIn.md @@ -0,0 +1,11 @@ +# BatchDeleteFactsIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ids** | **Vec** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/BatchDeleteProceduresIn.md b/pipelit-client/docs/BatchDeleteProceduresIn.md new file mode 100644 index 0000000..dd21ea5 --- /dev/null +++ b/pipelit-client/docs/BatchDeleteProceduresIn.md @@ -0,0 +1,11 @@ +# BatchDeleteProceduresIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ids** | **Vec** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/BatchDeleteSchedulesIn.md b/pipelit-client/docs/BatchDeleteSchedulesIn.md new file mode 100644 index 0000000..da28869 --- /dev/null +++ b/pipelit-client/docs/BatchDeleteSchedulesIn.md @@ -0,0 +1,11 @@ +# BatchDeleteSchedulesIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**schedule_ids** | **Vec** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/BatchDeleteTasksIn.md b/pipelit-client/docs/BatchDeleteTasksIn.md new file mode 100644 index 0000000..f94cb46 --- /dev/null +++ b/pipelit-client/docs/BatchDeleteTasksIn.md @@ -0,0 +1,11 @@ +# BatchDeleteTasksIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**task_ids** | **Vec** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/BatchDeleteUsersIn.md b/pipelit-client/docs/BatchDeleteUsersIn.md new file mode 100644 index 0000000..c46df87 --- /dev/null +++ b/pipelit-client/docs/BatchDeleteUsersIn.md @@ -0,0 +1,11 @@ +# BatchDeleteUsersIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ids** | **Vec** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/BatchDeleteWorkflowsIn.md b/pipelit-client/docs/BatchDeleteWorkflowsIn.md new file mode 100644 index 0000000..a94f93b --- /dev/null +++ b/pipelit-client/docs/BatchDeleteWorkflowsIn.md @@ -0,0 +1,11 @@ +# BatchDeleteWorkflowsIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**slugs** | **Vec** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/BatchDeleteWorkspacesIn.md b/pipelit-client/docs/BatchDeleteWorkspacesIn.md new file mode 100644 index 0000000..f648fe6 --- /dev/null +++ b/pipelit-client/docs/BatchDeleteWorkspacesIn.md @@ -0,0 +1,11 @@ +# BatchDeleteWorkspacesIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ids** | **Vec** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/CapabilitiesInfo.md b/pipelit-client/docs/CapabilitiesInfo.md new file mode 100644 index 0000000..c831246 --- /dev/null +++ b/pipelit-client/docs/CapabilitiesInfo.md @@ -0,0 +1,13 @@ +# CapabilitiesInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**runtimes** | [**std::collections::HashMap**](RuntimeInfo.md) | | +**shell_tools** | [**std::collections::HashMap**](ShellToolInfo.md) | | +**network** | [**models::NetworkInfo**](NetworkInfo.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ChatApi.md b/pipelit-client/docs/ChatApi.md new file mode 100644 index 0000000..daeecc0 --- /dev/null +++ b/pipelit-client/docs/ChatApi.md @@ -0,0 +1,196 @@ +# \ChatApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_chat_history_api_v1_workflows_slug_chat_history_delete**](ChatApi.md#delete_chat_history_api_v1_workflows_slug_chat_history_delete) | **DELETE** /api/v1/workflows/{slug}/chat/history | Delete Chat History +[**delete_chat_history_api_v1_workflows_slug_chat_history_delete_0**](ChatApi.md#delete_chat_history_api_v1_workflows_slug_chat_history_delete_0) | **DELETE** /api/v1/workflows/{slug}/chat/history | Delete Chat History +[**get_chat_history_api_v1_workflows_slug_chat_history_get**](ChatApi.md#get_chat_history_api_v1_workflows_slug_chat_history_get) | **GET** /api/v1/workflows/{slug}/chat/history | Get Chat History +[**get_chat_history_api_v1_workflows_slug_chat_history_get_0**](ChatApi.md#get_chat_history_api_v1_workflows_slug_chat_history_get_0) | **GET** /api/v1/workflows/{slug}/chat/history | Get Chat History +[**send_chat_message_api_v1_workflows_slug_chat_post**](ChatApi.md#send_chat_message_api_v1_workflows_slug_chat_post) | **POST** /api/v1/workflows/{slug}/chat/ | Send Chat Message +[**send_chat_message_api_v1_workflows_slug_chat_post_0**](ChatApi.md#send_chat_message_api_v1_workflows_slug_chat_post_0) | **POST** /api/v1/workflows/{slug}/chat/ | Send Chat Message + + + +## delete_chat_history_api_v1_workflows_slug_chat_history_delete + +> delete_chat_history_api_v1_workflows_slug_chat_history_delete(slug) +Delete Chat History + +Delete chat history from LangGraph checkpoints for this workflow. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## delete_chat_history_api_v1_workflows_slug_chat_history_delete_0 + +> delete_chat_history_api_v1_workflows_slug_chat_history_delete_0(slug) +Delete Chat History + +Delete chat history from LangGraph checkpoints for this workflow. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_chat_history_api_v1_workflows_slug_chat_history_get + +> serde_json::Value get_chat_history_api_v1_workflows_slug_chat_history_get(slug, limit, before) +Get Chat History + +Load chat history from LangGraph checkpoints. Args: slug: Workflow slug limit: Max messages to return (default 10) before: ISO datetime string - only return messages before this time + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**limit** | Option<**i32**> | | |[default to 10] +**before** | Option<**String**> | | | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_chat_history_api_v1_workflows_slug_chat_history_get_0 + +> serde_json::Value get_chat_history_api_v1_workflows_slug_chat_history_get_0(slug, limit, before) +Get Chat History + +Load chat history from LangGraph checkpoints. Args: slug: Workflow slug limit: Max messages to return (default 10) before: ISO datetime string - only return messages before this time + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**limit** | Option<**i32**> | | |[default to 10] +**before** | Option<**String**> | | | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## send_chat_message_api_v1_workflows_slug_chat_post + +> models::ChatMessageOut send_chat_message_api_v1_workflows_slug_chat_post(slug, chat_message_in) +Send Chat Message + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**chat_message_in** | [**ChatMessageIn**](ChatMessageIn.md) | | [required] | + +### Return type + +[**models::ChatMessageOut**](ChatMessageOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## send_chat_message_api_v1_workflows_slug_chat_post_0 + +> models::ChatMessageOut send_chat_message_api_v1_workflows_slug_chat_post_0(slug, chat_message_in) +Send Chat Message + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**chat_message_in** | [**ChatMessageIn**](ChatMessageIn.md) | | [required] | + +### Return type + +[**models::ChatMessageOut**](ChatMessageOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/docs/ChatMessageIn.md b/pipelit-client/docs/ChatMessageIn.md new file mode 100644 index 0000000..e70ca18 --- /dev/null +++ b/pipelit-client/docs/ChatMessageIn.md @@ -0,0 +1,12 @@ +# ChatMessageIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **String** | | +**trigger_node_id** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ChatMessageOut.md b/pipelit-client/docs/ChatMessageOut.md new file mode 100644 index 0000000..f756d2e --- /dev/null +++ b/pipelit-client/docs/ChatMessageOut.md @@ -0,0 +1,13 @@ +# ChatMessageOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**execution_id** | **String** | | +**status** | **String** | | +**response** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ComponentConfigData.md b/pipelit-client/docs/ComponentConfigData.md new file mode 100644 index 0000000..c241d72 --- /dev/null +++ b/pipelit-client/docs/ComponentConfigData.md @@ -0,0 +1,27 @@ +# ComponentConfigData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**system_prompt** | Option<**String**> | | [optional][default to ] +**extra_config** | Option<**std::collections::HashMap**> | | [optional][default to {}] +**llm_credential_id** | Option<**i32**> | | [optional] +**model_name** | Option<**String**> | | [optional][default to ] +**temperature** | Option<**f64**> | | [optional] +**max_tokens** | Option<**i32**> | | [optional] +**frequency_penalty** | Option<**f64**> | | [optional] +**presence_penalty** | Option<**f64**> | | [optional] +**top_p** | Option<**f64**> | | [optional] +**timeout** | Option<**i32**> | | [optional] +**max_retries** | Option<**i32**> | | [optional] +**response_format** | Option<**std::collections::HashMap**> | | [optional] +**llm_model_config_id** | Option<**i32**> | | [optional] +**credential_id** | Option<**i32**> | | [optional] +**is_active** | Option<**bool**> | | [optional][default to true] +**priority** | Option<**i32**> | | [optional][default to 0] +**trigger_config** | Option<**std::collections::HashMap**> | | [optional][default to {}] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/CredentialIn.md b/pipelit-client/docs/CredentialIn.md new file mode 100644 index 0000000..175b485 --- /dev/null +++ b/pipelit-client/docs/CredentialIn.md @@ -0,0 +1,13 @@ +# CredentialIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | +**credential_type** | **CredentialType** | (enum: git, llm, gateway, tool) | +**detail** | Option<**std::collections::HashMap**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/CredentialModelOut.md b/pipelit-client/docs/CredentialModelOut.md new file mode 100644 index 0000000..1dd1867 --- /dev/null +++ b/pipelit-client/docs/CredentialModelOut.md @@ -0,0 +1,12 @@ +# CredentialModelOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**name** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/CredentialOut.md b/pipelit-client/docs/CredentialOut.md new file mode 100644 index 0000000..52a7d4d --- /dev/null +++ b/pipelit-client/docs/CredentialOut.md @@ -0,0 +1,16 @@ +# CredentialOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **i32** | | +**name** | **String** | | +**credential_type** | **CredentialType** | (enum: git, llm, gateway, tool) | +**detail** | Option<[**models::Detail**](Detail.md)> | | [optional] +**created_at** | **String** | | +**updated_at** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/CredentialTestOut.md b/pipelit-client/docs/CredentialTestOut.md new file mode 100644 index 0000000..0b16e60 --- /dev/null +++ b/pipelit-client/docs/CredentialTestOut.md @@ -0,0 +1,13 @@ +# CredentialTestOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ok** | **bool** | | +**error** | Option<**String**> | | [optional][default to ] +**detail** | Option<[**models::Detail**](Detail.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/CredentialUpdate.md b/pipelit-client/docs/CredentialUpdate.md new file mode 100644 index 0000000..c39b614 --- /dev/null +++ b/pipelit-client/docs/CredentialUpdate.md @@ -0,0 +1,12 @@ +# CredentialUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | | [optional] +**detail** | Option<**std::collections::HashMap**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/CredentialsApi.md b/pipelit-client/docs/CredentialsApi.md new file mode 100644 index 0000000..b06f9d8 --- /dev/null +++ b/pipelit-client/docs/CredentialsApi.md @@ -0,0 +1,300 @@ +# \CredentialsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**activate_credential_api_v1_credentials_credential_id_activate_post**](CredentialsApi.md#activate_credential_api_v1_credentials_credential_id_activate_post) | **POST** /api/v1/credentials/{credential_id}/activate/ | Activate Credential +[**batch_delete_credentials_api_v1_credentials_batch_delete_post**](CredentialsApi.md#batch_delete_credentials_api_v1_credentials_batch_delete_post) | **POST** /api/v1/credentials/batch-delete/ | Batch Delete Credentials +[**create_credential_api_v1_credentials_post**](CredentialsApi.md#create_credential_api_v1_credentials_post) | **POST** /api/v1/credentials/ | Create Credential +[**deactivate_credential_api_v1_credentials_credential_id_deactivate_post**](CredentialsApi.md#deactivate_credential_api_v1_credentials_credential_id_deactivate_post) | **POST** /api/v1/credentials/{credential_id}/deactivate/ | Deactivate Credential +[**delete_credential_api_v1_credentials_credential_id_delete**](CredentialsApi.md#delete_credential_api_v1_credentials_credential_id_delete) | **DELETE** /api/v1/credentials/{credential_id}/ | Delete Credential +[**get_credential_api_v1_credentials_credential_id_get**](CredentialsApi.md#get_credential_api_v1_credentials_credential_id_get) | **GET** /api/v1/credentials/{credential_id}/ | Get Credential +[**list_credential_models_api_v1_credentials_credential_id_models_get**](CredentialsApi.md#list_credential_models_api_v1_credentials_credential_id_models_get) | **GET** /api/v1/credentials/{credential_id}/models/ | List Credential Models +[**list_credentials_api_v1_credentials_get**](CredentialsApi.md#list_credentials_api_v1_credentials_get) | **GET** /api/v1/credentials/ | List Credentials +[**test_credential_api_v1_credentials_credential_id_test_post**](CredentialsApi.md#test_credential_api_v1_credentials_credential_id_test_post) | **POST** /api/v1/credentials/{credential_id}/test/ | Test Credential +[**update_credential_api_v1_credentials_credential_id_patch**](CredentialsApi.md#update_credential_api_v1_credentials_credential_id_patch) | **PATCH** /api/v1/credentials/{credential_id}/ | Update Credential + + + +## activate_credential_api_v1_credentials_credential_id_activate_post + +> serde_json::Value activate_credential_api_v1_credentials_credential_id_activate_post(credential_id) +Activate Credential + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**credential_id** | **i32** | | [required] | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## batch_delete_credentials_api_v1_credentials_batch_delete_post + +> batch_delete_credentials_api_v1_credentials_batch_delete_post(batch_delete_credentials_in) +Batch Delete Credentials + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**batch_delete_credentials_in** | [**BatchDeleteCredentialsIn**](BatchDeleteCredentialsIn.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## create_credential_api_v1_credentials_post + +> models::CredentialOut create_credential_api_v1_credentials_post(credential_in) +Create Credential + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**credential_in** | [**CredentialIn**](CredentialIn.md) | | [required] | + +### Return type + +[**models::CredentialOut**](CredentialOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## deactivate_credential_api_v1_credentials_credential_id_deactivate_post + +> serde_json::Value deactivate_credential_api_v1_credentials_credential_id_deactivate_post(credential_id) +Deactivate Credential + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**credential_id** | **i32** | | [required] | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## delete_credential_api_v1_credentials_credential_id_delete + +> delete_credential_api_v1_credentials_credential_id_delete(credential_id) +Delete Credential + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**credential_id** | **i32** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_credential_api_v1_credentials_credential_id_get + +> models::CredentialOut get_credential_api_v1_credentials_credential_id_get(credential_id) +Get Credential + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**credential_id** | **i32** | | [required] | + +### Return type + +[**models::CredentialOut**](CredentialOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_credential_models_api_v1_credentials_credential_id_models_get + +> Vec list_credential_models_api_v1_credentials_credential_id_models_get(credential_id) +List Credential Models + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**credential_id** | **i32** | | [required] | + +### Return type + +[**Vec**](CredentialModelOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_credentials_api_v1_credentials_get + +> serde_json::Value list_credentials_api_v1_credentials_get(limit, offset) +List Credentials + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**limit** | Option<**i32**> | | |[default to 50] +**offset** | Option<**i32**> | | |[default to 0] + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## test_credential_api_v1_credentials_credential_id_test_post + +> models::CredentialTestOut test_credential_api_v1_credentials_credential_id_test_post(credential_id) +Test Credential + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**credential_id** | **i32** | | [required] | + +### Return type + +[**models::CredentialTestOut**](CredentialTestOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## update_credential_api_v1_credentials_credential_id_patch + +> models::CredentialOut update_credential_api_v1_credentials_credential_id_patch(credential_id, credential_update) +Update Credential + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**credential_id** | **i32** | | [required] | +**credential_update** | [**CredentialUpdate**](CredentialUpdate.md) | | [required] | + +### Return type + +[**models::CredentialOut**](CredentialOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/docs/DefaultApi.md b/pipelit-client/docs/DefaultApi.md new file mode 100644 index 0000000..a20558e --- /dev/null +++ b/pipelit-client/docs/DefaultApi.md @@ -0,0 +1,36 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**health_check_health_get**](DefaultApi.md#health_check_health_get) | **GET** /health | Health Check + + + +## health_check_health_get + +> serde_json::Value health_check_health_get() +Health Check + +Health check endpoint — no auth required. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**serde_json::Value**](serde_json::Value.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) + diff --git a/pipelit-client/docs/Detail.md b/pipelit-client/docs/Detail.md new file mode 100644 index 0000000..8425b9e --- /dev/null +++ b/pipelit-client/docs/Detail.md @@ -0,0 +1,10 @@ +# Detail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/EdgeIn.md b/pipelit-client/docs/EdgeIn.md new file mode 100644 index 0000000..8f2ffad --- /dev/null +++ b/pipelit-client/docs/EdgeIn.md @@ -0,0 +1,17 @@ +# EdgeIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source_node_id** | **String** | | +**target_node_id** | Option<**String**> | | [optional][default to ] +**edge_type** | Option<**EdgeType**> | (enum: direct, conditional) | [optional][default to Direct] +**edge_label** | Option<**EdgeLabel**> | (enum: , llm, tool, output_parser, loop_body, loop_return, skill) | [optional][default to Empty] +**condition_mapping** | Option<**std::collections::HashMap**> | | [optional] +**condition_value** | Option<**String**> | | [optional][default to ] +**priority** | Option<**i32**> | | [optional][default to 0] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/EdgeOut.md b/pipelit-client/docs/EdgeOut.md new file mode 100644 index 0000000..dd1029f --- /dev/null +++ b/pipelit-client/docs/EdgeOut.md @@ -0,0 +1,18 @@ +# EdgeOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **i32** | | +**source_node_id** | **String** | | +**target_node_id** | **String** | | +**edge_type** | **EdgeType** | (enum: direct, conditional) | +**edge_label** | Option<**EdgeLabel**> | (enum: , llm, tool, output_parser, loop_body, loop_return, skill) | [optional][default to Empty] +**condition_mapping** | Option<**std::collections::HashMap**> | | [optional] +**condition_value** | Option<**String**> | | [optional][default to ] +**priority** | **i32** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/EdgeUpdate.md b/pipelit-client/docs/EdgeUpdate.md new file mode 100644 index 0000000..0782124 --- /dev/null +++ b/pipelit-client/docs/EdgeUpdate.md @@ -0,0 +1,17 @@ +# EdgeUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source_node_id** | Option<**String**> | | [optional] +**target_node_id** | Option<**String**> | | [optional] +**edge_type** | Option<**EdgeType**> | (enum: direct, conditional) | [optional] +**edge_label** | Option<**EdgeLabel**> | (enum: , llm, tool, output_parser, loop_body, loop_return, skill) | [optional] +**condition_mapping** | Option<**std::collections::HashMap**> | | [optional] +**condition_value** | Option<**String**> | | [optional] +**priority** | Option<**i32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/EdgesApi.md b/pipelit-client/docs/EdgesApi.md new file mode 100644 index 0000000..a8aee27 --- /dev/null +++ b/pipelit-client/docs/EdgesApi.md @@ -0,0 +1,338 @@ +# \EdgesApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_edge_api_v1_workflows_slug_edges_post**](EdgesApi.md#create_edge_api_v1_workflows_slug_edges_post) | **POST** /api/v1/workflows/{slug}/edges/ | Create Edge +[**create_node_api_v1_workflows_slug_nodes_post**](EdgesApi.md#create_node_api_v1_workflows_slug_nodes_post) | **POST** /api/v1/workflows/{slug}/nodes/ | Create Node +[**delete_edge_api_v1_workflows_slug_edges_edge_id_delete**](EdgesApi.md#delete_edge_api_v1_workflows_slug_edges_edge_id_delete) | **DELETE** /api/v1/workflows/{slug}/edges/{edge_id}/ | Delete Edge +[**delete_node_api_v1_workflows_slug_nodes_node_id_delete**](EdgesApi.md#delete_node_api_v1_workflows_slug_nodes_node_id_delete) | **DELETE** /api/v1/workflows/{slug}/nodes/{node_id}/ | Delete Node +[**list_edges_api_v1_workflows_slug_edges_get**](EdgesApi.md#list_edges_api_v1_workflows_slug_edges_get) | **GET** /api/v1/workflows/{slug}/edges/ | List Edges +[**list_nodes_api_v1_workflows_slug_nodes_get**](EdgesApi.md#list_nodes_api_v1_workflows_slug_nodes_get) | **GET** /api/v1/workflows/{slug}/nodes/ | List Nodes +[**schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post**](EdgesApi.md#schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post) | **POST** /api/v1/workflows/{slug}/nodes/{node_id}/schedule/pause/ | Schedule Pause +[**schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post**](EdgesApi.md#schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post) | **POST** /api/v1/workflows/{slug}/nodes/{node_id}/schedule/start/ | Schedule Start +[**schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post**](EdgesApi.md#schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post) | **POST** /api/v1/workflows/{slug}/nodes/{node_id}/schedule/stop/ | Schedule Stop +[**update_edge_api_v1_workflows_slug_edges_edge_id_patch**](EdgesApi.md#update_edge_api_v1_workflows_slug_edges_edge_id_patch) | **PATCH** /api/v1/workflows/{slug}/edges/{edge_id}/ | Update Edge +[**update_node_api_v1_workflows_slug_nodes_node_id_patch**](EdgesApi.md#update_node_api_v1_workflows_slug_nodes_node_id_patch) | **PATCH** /api/v1/workflows/{slug}/nodes/{node_id}/ | Update Node + + + +## create_edge_api_v1_workflows_slug_edges_post + +> models::EdgeOut create_edge_api_v1_workflows_slug_edges_post(slug, edge_in) +Create Edge + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**edge_in** | [**EdgeIn**](EdgeIn.md) | | [required] | + +### Return type + +[**models::EdgeOut**](EdgeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## create_node_api_v1_workflows_slug_nodes_post + +> models::NodeOut create_node_api_v1_workflows_slug_nodes_post(slug, node_in) +Create Node + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**node_in** | [**NodeIn**](NodeIn.md) | | [required] | + +### Return type + +[**models::NodeOut**](NodeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## delete_edge_api_v1_workflows_slug_edges_edge_id_delete + +> delete_edge_api_v1_workflows_slug_edges_edge_id_delete(slug, edge_id) +Delete Edge + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**edge_id** | **i32** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## delete_node_api_v1_workflows_slug_nodes_node_id_delete + +> delete_node_api_v1_workflows_slug_nodes_node_id_delete(slug, node_id) +Delete Node + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**node_id** | **String** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_edges_api_v1_workflows_slug_edges_get + +> Vec list_edges_api_v1_workflows_slug_edges_get(slug) +List Edges + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | + +### Return type + +[**Vec**](EdgeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_nodes_api_v1_workflows_slug_nodes_get + +> Vec list_nodes_api_v1_workflows_slug_nodes_get(slug) +List Nodes + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | + +### Return type + +[**Vec**](NodeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post + +> models::NodeOut schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post(slug, node_id) +Schedule Pause + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**node_id** | **String** | | [required] | + +### Return type + +[**models::NodeOut**](NodeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post + +> models::NodeOut schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post(slug, node_id) +Schedule Start + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**node_id** | **String** | | [required] | + +### Return type + +[**models::NodeOut**](NodeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post + +> models::NodeOut schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post(slug, node_id) +Schedule Stop + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**node_id** | **String** | | [required] | + +### Return type + +[**models::NodeOut**](NodeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## update_edge_api_v1_workflows_slug_edges_edge_id_patch + +> models::EdgeOut update_edge_api_v1_workflows_slug_edges_edge_id_patch(slug, edge_id, edge_update) +Update Edge + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**edge_id** | **i32** | | [required] | +**edge_update** | [**EdgeUpdate**](EdgeUpdate.md) | | [required] | + +### Return type + +[**models::EdgeOut**](EdgeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## update_node_api_v1_workflows_slug_nodes_node_id_patch + +> models::NodeOut update_node_api_v1_workflows_slug_nodes_node_id_patch(slug, node_id, node_update) +Update Node + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**node_id** | **String** | | [required] | +**node_update** | [**NodeUpdate**](NodeUpdate.md) | | [required] | + +### Return type + +[**models::NodeOut**](NodeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/docs/EnvironmentInfo.md b/pipelit-client/docs/EnvironmentInfo.md new file mode 100644 index 0000000..f096990 --- /dev/null +++ b/pipelit-client/docs/EnvironmentInfo.md @@ -0,0 +1,20 @@ +# EnvironmentInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**os** | **String** | | +**arch** | **String** | | +**container** | Option<**String**> | | [optional] +**bwrap_available** | **bool** | | +**rootfs_ready** | **bool** | | +**sandbox_mode** | **String** | | +**capabilities** | [**models::CapabilitiesInfo**](CapabilitiesInfo.md) | | +**tier1_met** | **bool** | | +**tier2_warnings** | **Vec** | | +**gate** | [**models::GateResult**](GateResult.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/EpicCreate.md b/pipelit-client/docs/EpicCreate.md new file mode 100644 index 0000000..bf131ba --- /dev/null +++ b/pipelit-client/docs/EpicCreate.md @@ -0,0 +1,17 @@ +# EpicCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **String** | | +**description** | Option<**String**> | | [optional][default to ] +**tags** | Option<**Vec**> | | [optional][default to []] +**priority** | Option<**i32**> | | [optional][default to 2] +**budget_tokens** | Option<**i32**> | | [optional] +**budget_usd** | Option<**f64**> | | [optional] +**workflow_id** | Option<**i32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/EpicOut.md b/pipelit-client/docs/EpicOut.md new file mode 100644 index 0000000..075804f --- /dev/null +++ b/pipelit-client/docs/EpicOut.md @@ -0,0 +1,32 @@ +# EpicOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**title** | **String** | | +**description** | Option<**String**> | | [optional][default to ] +**tags** | Option<**Vec**> | | [optional][default to []] +**created_by_node_id** | Option<**String**> | | [optional] +**workflow_id** | Option<**i32**> | | [optional] +**user_profile_id** | Option<**i32**> | | [optional] +**status** | Option<**String**> | | [optional][default to planning] +**priority** | Option<**i32**> | | [optional][default to 2] +**budget_tokens** | Option<**i32**> | | [optional] +**budget_usd** | Option<**f64**> | | [optional] +**spent_tokens** | Option<**i32**> | | [optional][default to 0] +**spent_usd** | Option<**f64**> | | [optional][default to 0.0] +**agent_overhead_tokens** | Option<**i32**> | | [optional][default to 0] +**agent_overhead_usd** | Option<**f64**> | | [optional][default to 0.0] +**total_tasks** | Option<**i32**> | | [optional][default to 0] +**completed_tasks** | Option<**i32**> | | [optional][default to 0] +**failed_tasks** | Option<**i32**> | | [optional][default to 0] +**created_at** | Option<**String**> | | [optional] +**updated_at** | Option<**String**> | | [optional] +**completed_at** | Option<**String**> | | [optional] +**result_summary** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/EpicUpdate.md b/pipelit-client/docs/EpicUpdate.md new file mode 100644 index 0000000..dd538e4 --- /dev/null +++ b/pipelit-client/docs/EpicUpdate.md @@ -0,0 +1,18 @@ +# EpicUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**tags** | Option<**Vec**> | | [optional] +**status** | Option<**Status**> | (enum: planning, active, paused, completed, failed, cancelled) | [optional] +**priority** | Option<**i32**> | | [optional] +**budget_tokens** | Option<**i32**> | | [optional] +**budget_usd** | Option<**f64**> | | [optional] +**result_summary** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/EpicsApi.md b/pipelit-client/docs/EpicsApi.md new file mode 100644 index 0000000..e752464 --- /dev/null +++ b/pipelit-client/docs/EpicsApi.md @@ -0,0 +1,217 @@ +# \EpicsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**batch_delete_epics_api_v1_epics_batch_delete_post**](EpicsApi.md#batch_delete_epics_api_v1_epics_batch_delete_post) | **POST** /api/v1/epics/batch-delete/ | Batch Delete Epics +[**create_epic_api_v1_epics_post**](EpicsApi.md#create_epic_api_v1_epics_post) | **POST** /api/v1/epics/ | Create Epic +[**delete_epic_api_v1_epics_epic_id_delete**](EpicsApi.md#delete_epic_api_v1_epics_epic_id_delete) | **DELETE** /api/v1/epics/{epic_id}/ | Delete Epic +[**get_epic_api_v1_epics_epic_id_get**](EpicsApi.md#get_epic_api_v1_epics_epic_id_get) | **GET** /api/v1/epics/{epic_id}/ | Get Epic +[**list_epic_tasks_api_v1_epics_epic_id_tasks_get**](EpicsApi.md#list_epic_tasks_api_v1_epics_epic_id_tasks_get) | **GET** /api/v1/epics/{epic_id}/tasks/ | List Epic Tasks +[**list_epics_api_v1_epics_get**](EpicsApi.md#list_epics_api_v1_epics_get) | **GET** /api/v1/epics/ | List Epics +[**update_epic_api_v1_epics_epic_id_patch**](EpicsApi.md#update_epic_api_v1_epics_epic_id_patch) | **PATCH** /api/v1/epics/{epic_id}/ | Update Epic + + + +## batch_delete_epics_api_v1_epics_batch_delete_post + +> batch_delete_epics_api_v1_epics_batch_delete_post(batch_delete_epics_in) +Batch Delete Epics + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**batch_delete_epics_in** | [**BatchDeleteEpicsIn**](BatchDeleteEpicsIn.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## create_epic_api_v1_epics_post + +> models::EpicOut create_epic_api_v1_epics_post(epic_create) +Create Epic + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**epic_create** | [**EpicCreate**](EpicCreate.md) | | [required] | + +### Return type + +[**models::EpicOut**](EpicOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## delete_epic_api_v1_epics_epic_id_delete + +> delete_epic_api_v1_epics_epic_id_delete(epic_id) +Delete Epic + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**epic_id** | **String** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_epic_api_v1_epics_epic_id_get + +> models::EpicOut get_epic_api_v1_epics_epic_id_get(epic_id) +Get Epic + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**epic_id** | **String** | | [required] | + +### Return type + +[**models::EpicOut**](EpicOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_epic_tasks_api_v1_epics_epic_id_tasks_get + +> serde_json::Value list_epic_tasks_api_v1_epics_epic_id_tasks_get(epic_id, limit, offset) +List Epic Tasks + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**epic_id** | **String** | | [required] | +**limit** | Option<**i32**> | | |[default to 50] +**offset** | Option<**i32**> | | |[default to 0] + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_epics_api_v1_epics_get + +> serde_json::Value list_epics_api_v1_epics_get(limit, offset, status, tags) +List Epics + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**limit** | Option<**i32**> | | |[default to 50] +**offset** | Option<**i32**> | | |[default to 0] +**status** | Option<**String**> | | | +**tags** | Option<**String**> | | | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## update_epic_api_v1_epics_epic_id_patch + +> models::EpicOut update_epic_api_v1_epics_epic_id_patch(epic_id, epic_update) +Update Epic + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**epic_id** | **String** | | [required] | +**epic_update** | [**EpicUpdate**](EpicUpdate.md) | | [required] | + +### Return type + +[**models::EpicOut**](EpicOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/docs/ExecutionDetailOut.md b/pipelit-client/docs/ExecutionDetailOut.md new file mode 100644 index 0000000..ab74537 --- /dev/null +++ b/pipelit-client/docs/ExecutionDetailOut.md @@ -0,0 +1,22 @@ +# ExecutionDetailOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**execution_id** | **String** | | +**workflow_slug** | **String** | | +**status** | **String** | | +**error_message** | Option<**String**> | | [optional][default to ] +**started_at** | Option<**String**> | | [optional] +**completed_at** | Option<**String**> | | [optional] +**total_tokens** | Option<**i32**> | | [optional][default to 0] +**total_cost_usd** | Option<**f64**> | | [optional][default to 0.0] +**llm_calls** | Option<**i32**> | | [optional][default to 0] +**final_output** | Option<[**models::AnyOfLessThanGreaterThan**](AnyOf.md)> | | [optional] +**trigger_payload** | Option<[**models::AnyOfLessThanGreaterThan**](AnyOf.md)> | | [optional] +**logs** | Option<[**Vec**](ExecutionLogOut.md)> | | [optional][default to []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ExecutionLogOut.md b/pipelit-client/docs/ExecutionLogOut.md new file mode 100644 index 0000000..089e111 --- /dev/null +++ b/pipelit-client/docs/ExecutionLogOut.md @@ -0,0 +1,20 @@ +# ExecutionLogOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **i32** | | +**node_id** | **String** | | +**status** | **String** | | +**input** | Option<[**models::AnyOfLessThanGreaterThan**](AnyOf.md)> | | [optional] +**output** | Option<[**models::AnyOfLessThanGreaterThan**](AnyOf.md)> | | [optional] +**error** | Option<**String**> | | [optional][default to ] +**error_code** | Option<**String**> | | [optional] +**metadata** | Option<**std::collections::HashMap**> | | [optional] +**duration_ms** | Option<**i32**> | | [optional][default to 0] +**timestamp** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ExecutionOut.md b/pipelit-client/docs/ExecutionOut.md new file mode 100644 index 0000000..d48cd05 --- /dev/null +++ b/pipelit-client/docs/ExecutionOut.md @@ -0,0 +1,19 @@ +# ExecutionOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**execution_id** | **String** | | +**workflow_slug** | **String** | | +**status** | **String** | | +**error_message** | Option<**String**> | | [optional][default to ] +**started_at** | Option<**String**> | | [optional] +**completed_at** | Option<**String**> | | [optional] +**total_tokens** | Option<**i32**> | | [optional][default to 0] +**total_cost_usd** | Option<**f64**> | | [optional][default to 0.0] +**llm_calls** | Option<**i32**> | | [optional][default to 0] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ExecutionsApi.md b/pipelit-client/docs/ExecutionsApi.md new file mode 100644 index 0000000..d836b51 --- /dev/null +++ b/pipelit-client/docs/ExecutionsApi.md @@ -0,0 +1,127 @@ +# \ExecutionsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**batch_delete_executions_api_v1_executions_batch_delete_post**](ExecutionsApi.md#batch_delete_executions_api_v1_executions_batch_delete_post) | **POST** /api/v1/executions/batch-delete/ | Batch Delete Executions +[**cancel_execution_api_v1_executions_execution_id_cancel_post**](ExecutionsApi.md#cancel_execution_api_v1_executions_execution_id_cancel_post) | **POST** /api/v1/executions/{execution_id}/cancel/ | Cancel Execution +[**get_execution_api_v1_executions_execution_id_get**](ExecutionsApi.md#get_execution_api_v1_executions_execution_id_get) | **GET** /api/v1/executions/{execution_id}/ | Get Execution +[**list_executions_api_v1_executions_get**](ExecutionsApi.md#list_executions_api_v1_executions_get) | **GET** /api/v1/executions/ | List Executions + + + +## batch_delete_executions_api_v1_executions_batch_delete_post + +> batch_delete_executions_api_v1_executions_batch_delete_post(batch_delete_executions_in) +Batch Delete Executions + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**batch_delete_executions_in** | [**BatchDeleteExecutionsIn**](BatchDeleteExecutionsIn.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## cancel_execution_api_v1_executions_execution_id_cancel_post + +> models::ExecutionOut cancel_execution_api_v1_executions_execution_id_cancel_post(execution_id) +Cancel Execution + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**execution_id** | **String** | | [required] | + +### Return type + +[**models::ExecutionOut**](ExecutionOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_execution_api_v1_executions_execution_id_get + +> models::ExecutionDetailOut get_execution_api_v1_executions_execution_id_get(execution_id) +Get Execution + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**execution_id** | **String** | | [required] | + +### Return type + +[**models::ExecutionDetailOut**](ExecutionDetailOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_executions_api_v1_executions_get + +> serde_json::Value list_executions_api_v1_executions_get(workflow_slug, status, limit, offset) +List Executions + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**workflow_slug** | Option<**String**> | | | +**status** | Option<**String**> | | | +**limit** | Option<**i32**> | | |[default to 50] +**offset** | Option<**i32**> | | |[default to 0] + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/docs/GateResult.md b/pipelit-client/docs/GateResult.md new file mode 100644 index 0000000..add9106 --- /dev/null +++ b/pipelit-client/docs/GateResult.md @@ -0,0 +1,12 @@ +# GateResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**passed** | **bool** | | +**blocked_reason** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/GatewayInboundMessage.md b/pipelit-client/docs/GatewayInboundMessage.md new file mode 100644 index 0000000..31bd490 --- /dev/null +++ b/pipelit-client/docs/GatewayInboundMessage.md @@ -0,0 +1,17 @@ +# GatewayInboundMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**route** | **std::collections::HashMap** | | +**credential_id** | **String** | | +**source** | [**models::InboundSource**](InboundSource.md) | | +**text** | **String** | | +**attachments** | Option<[**Vec**](InboundAttachment.md)> | | [optional][default to []] +**timestamp** | **String** | | +**extra_data** | Option<**std::collections::HashMap**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/HttpValidationError.md b/pipelit-client/docs/HttpValidationError.md new file mode 100644 index 0000000..d111ad5 --- /dev/null +++ b/pipelit-client/docs/HttpValidationError.md @@ -0,0 +1,11 @@ +# HttpValidationError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**detail** | Option<[**Vec**](ValidationError.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/InboundApi.md b/pipelit-client/docs/InboundApi.md new file mode 100644 index 0000000..4585839 --- /dev/null +++ b/pipelit-client/docs/InboundApi.md @@ -0,0 +1,70 @@ +# \InboundApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**inbound_webhook_api_v1_inbound_post**](InboundApi.md#inbound_webhook_api_v1_inbound_post) | **POST** /api/v1/inbound | Inbound Webhook +[**inbound_webhook_api_v1_inbound_post_0**](InboundApi.md#inbound_webhook_api_v1_inbound_post_0) | **POST** /api/v1/inbound | Inbound Webhook + + + +## inbound_webhook_api_v1_inbound_post + +> serde_json::Value inbound_webhook_api_v1_inbound_post(gateway_inbound_message) +Inbound Webhook + +Receive a normalized message from msg-gateway and dispatch to workflow. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**gateway_inbound_message** | [**GatewayInboundMessage**](GatewayInboundMessage.md) | | [required] | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## inbound_webhook_api_v1_inbound_post_0 + +> serde_json::Value inbound_webhook_api_v1_inbound_post_0(gateway_inbound_message) +Inbound Webhook + +Receive a normalized message from msg-gateway and dispatch to workflow. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**gateway_inbound_message** | [**GatewayInboundMessage**](GatewayInboundMessage.md) | | [required] | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/docs/InboundAttachment.md b/pipelit-client/docs/InboundAttachment.md new file mode 100644 index 0000000..91f0f2f --- /dev/null +++ b/pipelit-client/docs/InboundAttachment.md @@ -0,0 +1,14 @@ +# InboundAttachment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filename** | **String** | | +**mime_type** | **String** | | +**size_bytes** | Option<**i32**> | | [optional][default to 0] +**download_url** | Option<**String**> | | [optional][default to ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/InboundSource.md b/pipelit-client/docs/InboundSource.md new file mode 100644 index 0000000..e53b743 --- /dev/null +++ b/pipelit-client/docs/InboundSource.md @@ -0,0 +1,15 @@ +# InboundSource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**protocol** | **String** | | +**chat_id** | **String** | | +**message_id** | Option<**String**> | | [optional][default to ] +**reply_to_message_id** | Option<**String**> | | [optional] +**from** | Option<[**models::UserInfo**](UserInfo.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/LocationInner.md b/pipelit-client/docs/LocationInner.md new file mode 100644 index 0000000..c5db6f0 --- /dev/null +++ b/pipelit-client/docs/LocationInner.md @@ -0,0 +1,10 @@ +# LocationInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ManualApi.md b/pipelit-client/docs/ManualApi.md new file mode 100644 index 0000000..d1bec9a --- /dev/null +++ b/pipelit-client/docs/ManualApi.md @@ -0,0 +1,67 @@ +# \ManualApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**execution_status_view_api_v1_executions_execution_id_status_get**](ManualApi.md#execution_status_view_api_v1_executions_execution_id_status_get) | **GET** /api/v1/executions/{execution_id}/status/ | Execution Status View +[**manual_execute_view_api_v1_workflows_workflow_slug_execute_post**](ManualApi.md#manual_execute_view_api_v1_workflows_workflow_slug_execute_post) | **POST** /api/v1/workflows/{workflow_slug}/execute/ | Manual Execute View + + + +## execution_status_view_api_v1_executions_execution_id_status_get + +> serde_json::Value execution_status_view_api_v1_executions_execution_id_status_get(execution_id) +Execution Status View + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**execution_id** | **String** | | [required] | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## manual_execute_view_api_v1_workflows_workflow_slug_execute_post + +> serde_json::Value manual_execute_view_api_v1_workflows_workflow_slug_execute_post(workflow_slug, manual_execute_in) +Manual Execute View + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**workflow_slug** | **String** | | [required] | +**manual_execute_in** | Option<[**ManualExecuteIn**](ManualExecuteIn.md)> | | | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/docs/ManualExecuteIn.md b/pipelit-client/docs/ManualExecuteIn.md new file mode 100644 index 0000000..e95b6ee --- /dev/null +++ b/pipelit-client/docs/ManualExecuteIn.md @@ -0,0 +1,12 @@ +# ManualExecuteIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | Option<**String**> | | [optional][default to ] +**trigger_node_id** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/MeResponse.md b/pipelit-client/docs/MeResponse.md new file mode 100644 index 0000000..94953f1 --- /dev/null +++ b/pipelit-client/docs/MeResponse.md @@ -0,0 +1,12 @@ +# MeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **String** | | +**mfa_enabled** | Option<**bool**> | | [optional][default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/MemoriesApi.md b/pipelit-client/docs/MemoriesApi.md new file mode 100644 index 0000000..296b646 --- /dev/null +++ b/pipelit-client/docs/MemoriesApi.md @@ -0,0 +1,308 @@ +# \MemoriesApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**batch_delete_checkpoints_api_v1_memories_checkpoints_batch_delete_post**](MemoriesApi.md#batch_delete_checkpoints_api_v1_memories_checkpoints_batch_delete_post) | **POST** /api/v1/memories/checkpoints/batch-delete/ | Batch Delete Checkpoints +[**batch_delete_episodes_api_v1_memories_episodes_batch_delete_post**](MemoriesApi.md#batch_delete_episodes_api_v1_memories_episodes_batch_delete_post) | **POST** /api/v1/memories/episodes/batch-delete/ | Batch Delete Episodes +[**batch_delete_facts_api_v1_memories_facts_batch_delete_post**](MemoriesApi.md#batch_delete_facts_api_v1_memories_facts_batch_delete_post) | **POST** /api/v1/memories/facts/batch-delete/ | Batch Delete Facts +[**batch_delete_procedures_api_v1_memories_procedures_batch_delete_post**](MemoriesApi.md#batch_delete_procedures_api_v1_memories_procedures_batch_delete_post) | **POST** /api/v1/memories/procedures/batch-delete/ | Batch Delete Procedures +[**batch_delete_users_api_v1_memories_users_batch_delete_post**](MemoriesApi.md#batch_delete_users_api_v1_memories_users_batch_delete_post) | **POST** /api/v1/memories/users/batch-delete/ | Batch Delete Users +[**list_checkpoints_api_v1_memories_checkpoints_get**](MemoriesApi.md#list_checkpoints_api_v1_memories_checkpoints_get) | **GET** /api/v1/memories/checkpoints/ | List Checkpoints +[**list_episodes_api_v1_memories_episodes_get**](MemoriesApi.md#list_episodes_api_v1_memories_episodes_get) | **GET** /api/v1/memories/episodes/ | List Episodes +[**list_facts_api_v1_memories_facts_get**](MemoriesApi.md#list_facts_api_v1_memories_facts_get) | **GET** /api/v1/memories/facts/ | List Facts +[**list_procedures_api_v1_memories_procedures_get**](MemoriesApi.md#list_procedures_api_v1_memories_procedures_get) | **GET** /api/v1/memories/procedures/ | List Procedures +[**list_users_api_v1_memories_users_get**](MemoriesApi.md#list_users_api_v1_memories_users_get) | **GET** /api/v1/memories/users/ | List Users + + + +## batch_delete_checkpoints_api_v1_memories_checkpoints_batch_delete_post + +> batch_delete_checkpoints_api_v1_memories_checkpoints_batch_delete_post(batch_delete_checkpoints_in) +Batch Delete Checkpoints + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**batch_delete_checkpoints_in** | [**BatchDeleteCheckpointsIn**](BatchDeleteCheckpointsIn.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## batch_delete_episodes_api_v1_memories_episodes_batch_delete_post + +> batch_delete_episodes_api_v1_memories_episodes_batch_delete_post(batch_delete_episodes_in) +Batch Delete Episodes + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**batch_delete_episodes_in** | [**BatchDeleteEpisodesIn**](BatchDeleteEpisodesIn.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## batch_delete_facts_api_v1_memories_facts_batch_delete_post + +> batch_delete_facts_api_v1_memories_facts_batch_delete_post(batch_delete_facts_in) +Batch Delete Facts + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**batch_delete_facts_in** | [**BatchDeleteFactsIn**](BatchDeleteFactsIn.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## batch_delete_procedures_api_v1_memories_procedures_batch_delete_post + +> batch_delete_procedures_api_v1_memories_procedures_batch_delete_post(batch_delete_procedures_in) +Batch Delete Procedures + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**batch_delete_procedures_in** | [**BatchDeleteProceduresIn**](BatchDeleteProceduresIn.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## batch_delete_users_api_v1_memories_users_batch_delete_post + +> batch_delete_users_api_v1_memories_users_batch_delete_post(batch_delete_users_in) +Batch Delete Users + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**batch_delete_users_in** | [**BatchDeleteUsersIn**](BatchDeleteUsersIn.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## list_checkpoints_api_v1_memories_checkpoints_get + +> serde_json::Value list_checkpoints_api_v1_memories_checkpoints_get(thread_id, limit, offset) +List Checkpoints + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**thread_id** | Option<**String**> | | | +**limit** | Option<**i32**> | | |[default to 50] +**offset** | Option<**i32**> | | |[default to 0] + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_episodes_api_v1_memories_episodes_get + +> serde_json::Value list_episodes_api_v1_memories_episodes_get(agent_id, limit, offset) +List Episodes + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**agent_id** | Option<**String**> | | | +**limit** | Option<**i32**> | | |[default to 50] +**offset** | Option<**i32**> | | |[default to 0] + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_facts_api_v1_memories_facts_get + +> serde_json::Value list_facts_api_v1_memories_facts_get(scope, fact_type, limit, offset) +List Facts + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**scope** | Option<**String**> | | | +**fact_type** | Option<**String**> | | | +**limit** | Option<**i32**> | | |[default to 50] +**offset** | Option<**i32**> | | |[default to 0] + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_procedures_api_v1_memories_procedures_get + +> serde_json::Value list_procedures_api_v1_memories_procedures_get(agent_id, limit, offset) +List Procedures + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**agent_id** | Option<**String**> | | | +**limit** | Option<**i32**> | | |[default to 50] +**offset** | Option<**i32**> | | |[default to 0] + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_users_api_v1_memories_users_get + +> serde_json::Value list_users_api_v1_memories_users_get(limit, offset) +List Users + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**limit** | Option<**i32**> | | |[default to 50] +**offset** | Option<**i32**> | | |[default to 0] + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/docs/MfaDisableRequest.md b/pipelit-client/docs/MfaDisableRequest.md new file mode 100644 index 0000000..8ca7c80 --- /dev/null +++ b/pipelit-client/docs/MfaDisableRequest.md @@ -0,0 +1,11 @@ +# MfaDisableRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/MfaLoginVerifyRequest.md b/pipelit-client/docs/MfaLoginVerifyRequest.md new file mode 100644 index 0000000..548fd79 --- /dev/null +++ b/pipelit-client/docs/MfaLoginVerifyRequest.md @@ -0,0 +1,12 @@ +# MfaLoginVerifyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **String** | | +**code** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/MfaSetupResponse.md b/pipelit-client/docs/MfaSetupResponse.md new file mode 100644 index 0000000..a5536aa --- /dev/null +++ b/pipelit-client/docs/MfaSetupResponse.md @@ -0,0 +1,12 @@ +# MfaSetupResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret** | **String** | | +**provisioning_uri** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/MfaStatusResponse.md b/pipelit-client/docs/MfaStatusResponse.md new file mode 100644 index 0000000..779d0fb --- /dev/null +++ b/pipelit-client/docs/MfaStatusResponse.md @@ -0,0 +1,11 @@ +# MfaStatusResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mfa_enabled** | **bool** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/MfaVerifyRequest.md b/pipelit-client/docs/MfaVerifyRequest.md new file mode 100644 index 0000000..6faf0ef --- /dev/null +++ b/pipelit-client/docs/MfaVerifyRequest.md @@ -0,0 +1,11 @@ +# MfaVerifyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/NetworkInfo.md b/pipelit-client/docs/NetworkInfo.md new file mode 100644 index 0000000..463ed33 --- /dev/null +++ b/pipelit-client/docs/NetworkInfo.md @@ -0,0 +1,12 @@ +# NetworkInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dns** | **bool** | | +**http** | **bool** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/NodeIn.md b/pipelit-client/docs/NodeIn.md new file mode 100644 index 0000000..7becdbd --- /dev/null +++ b/pipelit-client/docs/NodeIn.md @@ -0,0 +1,21 @@ +# NodeIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**node_id** | Option<**String**> | | [optional] +**label** | Option<**String**> | | [optional] +**component_type** | **ComponentType** | (enum: categorizer, router, extractor, ai_model, agent, deep_agent, switch, run_command, get_totp_code, platform_api, whoami, epic_tools, task_tools, spawn_and_await, workflow_create, workflow_discover, scheduler_tools, system_health, human_confirmation, workflow, code, code_execute, loop, wait, merge, filter, error_handler, output_parser, memory_read, memory_write, identify_user, trigger_telegram, trigger_schedule, trigger_manual, trigger_workflow, trigger_error, trigger_chat, skill) | +**is_entry_point** | Option<**bool**> | | [optional][default to false] +**interrupt_before** | Option<**bool**> | | [optional][default to false] +**interrupt_after** | Option<**bool**> | | [optional][default to false] +**position_x** | Option<**i32**> | | [optional][default to 0] +**position_y** | Option<**i32**> | | [optional][default to 0] +**config** | Option<[**models::ComponentConfigData**](ComponentConfigData.md)> | | [optional][default to {system_prompt=, extra_config={}, model_name=, is_active=true, priority=0, trigger_config={}}] +**subworkflow_id** | Option<**i32**> | | [optional] +**code_block_id** | Option<**i32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/NodeOut.md b/pipelit-client/docs/NodeOut.md new file mode 100644 index 0000000..f3cf8e6 --- /dev/null +++ b/pipelit-client/docs/NodeOut.md @@ -0,0 +1,24 @@ +# NodeOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **i32** | | +**node_id** | **String** | | +**label** | Option<**String**> | | [optional] +**component_type** | **ComponentType** | (enum: categorizer, router, extractor, ai_model, agent, deep_agent, switch, run_command, get_totp_code, platform_api, whoami, epic_tools, task_tools, spawn_and_await, workflow_create, workflow_discover, scheduler_tools, system_health, human_confirmation, workflow, code, code_execute, loop, wait, merge, filter, error_handler, output_parser, memory_read, memory_write, identify_user, trigger_telegram, trigger_schedule, trigger_manual, trigger_workflow, trigger_error, trigger_chat, skill) | +**is_entry_point** | **bool** | | +**interrupt_before** | **bool** | | +**interrupt_after** | **bool** | | +**position_x** | **i32** | | +**position_y** | **i32** | | +**config** | [**models::ComponentConfigData**](ComponentConfigData.md) | | +**subworkflow_id** | Option<**i32**> | | [optional] +**code_block_id** | Option<**i32**> | | [optional] +**updated_at** | **String** | | +**schedule_job** | Option<[**models::ScheduleJobInfo**](ScheduleJobInfo.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/NodeUpdate.md b/pipelit-client/docs/NodeUpdate.md new file mode 100644 index 0000000..3c45639 --- /dev/null +++ b/pipelit-client/docs/NodeUpdate.md @@ -0,0 +1,21 @@ +# NodeUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**node_id** | Option<**String**> | | [optional] +**label** | Option<**String**> | | [optional] +**component_type** | Option<**ComponentType**> | (enum: categorizer, router, extractor, ai_model, agent, deep_agent, switch, run_command, get_totp_code, platform_api, whoami, epic_tools, task_tools, spawn_and_await, workflow_create, workflow_discover, scheduler_tools, system_health, human_confirmation, workflow, code, code_execute, loop, wait, merge, filter, error_handler, output_parser, memory_read, memory_write, identify_user, trigger_telegram, trigger_schedule, trigger_manual, trigger_workflow, trigger_error, trigger_chat, skill) | [optional] +**is_entry_point** | Option<**bool**> | | [optional] +**interrupt_before** | Option<**bool**> | | [optional] +**interrupt_after** | Option<**bool**> | | [optional] +**position_x** | Option<**i32**> | | [optional] +**position_y** | Option<**i32**> | | [optional] +**config** | Option<[**models::ComponentConfigData**](ComponentConfigData.md)> | | [optional] +**subworkflow_id** | Option<**i32**> | | [optional] +**code_block_id** | Option<**i32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/NodesApi.md b/pipelit-client/docs/NodesApi.md new file mode 100644 index 0000000..c5b2c48 --- /dev/null +++ b/pipelit-client/docs/NodesApi.md @@ -0,0 +1,338 @@ +# \NodesApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_edge_api_v1_workflows_slug_edges_post**](NodesApi.md#create_edge_api_v1_workflows_slug_edges_post) | **POST** /api/v1/workflows/{slug}/edges/ | Create Edge +[**create_node_api_v1_workflows_slug_nodes_post**](NodesApi.md#create_node_api_v1_workflows_slug_nodes_post) | **POST** /api/v1/workflows/{slug}/nodes/ | Create Node +[**delete_edge_api_v1_workflows_slug_edges_edge_id_delete**](NodesApi.md#delete_edge_api_v1_workflows_slug_edges_edge_id_delete) | **DELETE** /api/v1/workflows/{slug}/edges/{edge_id}/ | Delete Edge +[**delete_node_api_v1_workflows_slug_nodes_node_id_delete**](NodesApi.md#delete_node_api_v1_workflows_slug_nodes_node_id_delete) | **DELETE** /api/v1/workflows/{slug}/nodes/{node_id}/ | Delete Node +[**list_edges_api_v1_workflows_slug_edges_get**](NodesApi.md#list_edges_api_v1_workflows_slug_edges_get) | **GET** /api/v1/workflows/{slug}/edges/ | List Edges +[**list_nodes_api_v1_workflows_slug_nodes_get**](NodesApi.md#list_nodes_api_v1_workflows_slug_nodes_get) | **GET** /api/v1/workflows/{slug}/nodes/ | List Nodes +[**schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post**](NodesApi.md#schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post) | **POST** /api/v1/workflows/{slug}/nodes/{node_id}/schedule/pause/ | Schedule Pause +[**schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post**](NodesApi.md#schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post) | **POST** /api/v1/workflows/{slug}/nodes/{node_id}/schedule/start/ | Schedule Start +[**schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post**](NodesApi.md#schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post) | **POST** /api/v1/workflows/{slug}/nodes/{node_id}/schedule/stop/ | Schedule Stop +[**update_edge_api_v1_workflows_slug_edges_edge_id_patch**](NodesApi.md#update_edge_api_v1_workflows_slug_edges_edge_id_patch) | **PATCH** /api/v1/workflows/{slug}/edges/{edge_id}/ | Update Edge +[**update_node_api_v1_workflows_slug_nodes_node_id_patch**](NodesApi.md#update_node_api_v1_workflows_slug_nodes_node_id_patch) | **PATCH** /api/v1/workflows/{slug}/nodes/{node_id}/ | Update Node + + + +## create_edge_api_v1_workflows_slug_edges_post + +> models::EdgeOut create_edge_api_v1_workflows_slug_edges_post(slug, edge_in) +Create Edge + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**edge_in** | [**EdgeIn**](EdgeIn.md) | | [required] | + +### Return type + +[**models::EdgeOut**](EdgeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## create_node_api_v1_workflows_slug_nodes_post + +> models::NodeOut create_node_api_v1_workflows_slug_nodes_post(slug, node_in) +Create Node + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**node_in** | [**NodeIn**](NodeIn.md) | | [required] | + +### Return type + +[**models::NodeOut**](NodeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## delete_edge_api_v1_workflows_slug_edges_edge_id_delete + +> delete_edge_api_v1_workflows_slug_edges_edge_id_delete(slug, edge_id) +Delete Edge + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**edge_id** | **i32** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## delete_node_api_v1_workflows_slug_nodes_node_id_delete + +> delete_node_api_v1_workflows_slug_nodes_node_id_delete(slug, node_id) +Delete Node + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**node_id** | **String** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_edges_api_v1_workflows_slug_edges_get + +> Vec list_edges_api_v1_workflows_slug_edges_get(slug) +List Edges + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | + +### Return type + +[**Vec**](EdgeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_nodes_api_v1_workflows_slug_nodes_get + +> Vec list_nodes_api_v1_workflows_slug_nodes_get(slug) +List Nodes + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | + +### Return type + +[**Vec**](NodeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post + +> models::NodeOut schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post(slug, node_id) +Schedule Pause + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**node_id** | **String** | | [required] | + +### Return type + +[**models::NodeOut**](NodeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post + +> models::NodeOut schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post(slug, node_id) +Schedule Start + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**node_id** | **String** | | [required] | + +### Return type + +[**models::NodeOut**](NodeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post + +> models::NodeOut schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post(slug, node_id) +Schedule Stop + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**node_id** | **String** | | [required] | + +### Return type + +[**models::NodeOut**](NodeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## update_edge_api_v1_workflows_slug_edges_edge_id_patch + +> models::EdgeOut update_edge_api_v1_workflows_slug_edges_edge_id_patch(slug, edge_id, edge_update) +Update Edge + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**edge_id** | **i32** | | [required] | +**edge_update** | [**EdgeUpdate**](EdgeUpdate.md) | | [required] | + +### Return type + +[**models::EdgeOut**](EdgeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## update_node_api_v1_workflows_slug_nodes_node_id_patch + +> models::NodeOut update_node_api_v1_workflows_slug_nodes_node_id_patch(slug, node_id, node_update) +Update Node + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**node_id** | **String** | | [required] | +**node_update** | [**NodeUpdate**](NodeUpdate.md) | | [required] | + +### Return type + +[**models::NodeOut**](NodeOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/docs/PlatformConfigOut.md b/pipelit-client/docs/PlatformConfigOut.md new file mode 100644 index 0000000..fb00554 --- /dev/null +++ b/pipelit-client/docs/PlatformConfigOut.md @@ -0,0 +1,19 @@ +# PlatformConfigOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pipelit_dir** | **String** | | +**sandbox_mode** | **String** | | +**database_url** | **String** | | +**redis_url** | **String** | | +**log_level** | **String** | | +**log_file** | **String** | | +**platform_base_url** | **String** | | +**cors_allow_all_origins** | Option<**bool**> | | [optional] +**zombie_execution_threshold_seconds** | Option<**i32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/RuntimeInfo.md b/pipelit-client/docs/RuntimeInfo.md new file mode 100644 index 0000000..b505f94 --- /dev/null +++ b/pipelit-client/docs/RuntimeInfo.md @@ -0,0 +1,13 @@ +# RuntimeInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**available** | **bool** | | +**version** | Option<**String**> | | [optional] +**path** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ScheduleJobInfo.md b/pipelit-client/docs/ScheduleJobInfo.md new file mode 100644 index 0000000..b72b035 --- /dev/null +++ b/pipelit-client/docs/ScheduleJobInfo.md @@ -0,0 +1,24 @@ +# ScheduleJobInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**status** | **String** | | +**run_count** | **i32** | | +**error_count** | **i32** | | +**current_repeat** | **i32** | | +**current_retry** | **i32** | | +**total_repeats** | **i32** | | +**max_retries** | **i32** | | +**timeout_seconds** | **i32** | | +**interval_seconds** | **i32** | | +**last_run_at** | Option<**String**> | | +**next_run_at** | Option<**String**> | | +**last_error** | Option<**String**> | | [optional][default to ] +**created_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ScheduledJobCreate.md b/pipelit-client/docs/ScheduledJobCreate.md new file mode 100644 index 0000000..620152f --- /dev/null +++ b/pipelit-client/docs/ScheduledJobCreate.md @@ -0,0 +1,19 @@ +# ScheduledJobCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | +**description** | Option<**String**> | | [optional][default to ] +**workflow_id** | **i32** | | +**trigger_node_id** | Option<**String**> | | [optional] +**interval_seconds** | **i32** | | +**total_repeats** | Option<**i32**> | | [optional][default to 0] +**max_retries** | Option<**i32**> | | [optional][default to 3] +**timeout_seconds** | Option<**i32**> | | [optional][default to 600] +**trigger_payload** | Option<**std::collections::HashMap**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ScheduledJobOut.md b/pipelit-client/docs/ScheduledJobOut.md new file mode 100644 index 0000000..423c1c4 --- /dev/null +++ b/pipelit-client/docs/ScheduledJobOut.md @@ -0,0 +1,31 @@ +# ScheduledJobOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**name** | **String** | | +**description** | Option<**String**> | | [optional][default to ] +**workflow_id** | **i32** | | +**trigger_node_id** | Option<**String**> | | [optional] +**user_profile_id** | **i32** | | +**interval_seconds** | **i32** | | +**total_repeats** | Option<**i32**> | | [optional][default to 0] +**max_retries** | Option<**i32**> | | [optional][default to 3] +**timeout_seconds** | Option<**i32**> | | [optional][default to 600] +**trigger_payload** | Option<**std::collections::HashMap**> | | [optional] +**status** | Option<**String**> | | [optional][default to active] +**current_repeat** | Option<**i32**> | | [optional][default to 0] +**current_retry** | Option<**i32**> | | [optional][default to 0] +**last_run_at** | Option<**String**> | | [optional] +**next_run_at** | Option<**String**> | | [optional] +**run_count** | Option<**i32**> | | [optional][default to 0] +**error_count** | Option<**i32**> | | [optional][default to 0] +**last_error** | Option<**String**> | | [optional][default to ] +**created_at** | Option<**String**> | | [optional] +**updated_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ScheduledJobUpdate.md b/pipelit-client/docs/ScheduledJobUpdate.md new file mode 100644 index 0000000..83511ce --- /dev/null +++ b/pipelit-client/docs/ScheduledJobUpdate.md @@ -0,0 +1,17 @@ +# ScheduledJobUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**interval_seconds** | Option<**i32**> | | [optional] +**total_repeats** | Option<**i32**> | | [optional] +**max_retries** | Option<**i32**> | | [optional] +**timeout_seconds** | Option<**i32**> | | [optional] +**trigger_payload** | Option<**std::collections::HashMap**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/SchedulesApi.md b/pipelit-client/docs/SchedulesApi.md new file mode 100644 index 0000000..d91c020 --- /dev/null +++ b/pipelit-client/docs/SchedulesApi.md @@ -0,0 +1,244 @@ +# \SchedulesApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**batch_delete_schedules_api_v1_schedules_batch_delete_post**](SchedulesApi.md#batch_delete_schedules_api_v1_schedules_batch_delete_post) | **POST** /api/v1/schedules/batch-delete/ | Batch Delete Schedules +[**create_schedule_api_v1_schedules_post**](SchedulesApi.md#create_schedule_api_v1_schedules_post) | **POST** /api/v1/schedules/ | Create Schedule +[**delete_schedule_api_v1_schedules_job_id_delete**](SchedulesApi.md#delete_schedule_api_v1_schedules_job_id_delete) | **DELETE** /api/v1/schedules/{job_id}/ | Delete Schedule +[**get_schedule_api_v1_schedules_job_id_get**](SchedulesApi.md#get_schedule_api_v1_schedules_job_id_get) | **GET** /api/v1/schedules/{job_id}/ | Get Schedule +[**list_schedules_api_v1_schedules_get**](SchedulesApi.md#list_schedules_api_v1_schedules_get) | **GET** /api/v1/schedules/ | List Schedules +[**pause_schedule_api_v1_schedules_job_id_pause_post**](SchedulesApi.md#pause_schedule_api_v1_schedules_job_id_pause_post) | **POST** /api/v1/schedules/{job_id}/pause/ | Pause Schedule +[**resume_schedule_api_v1_schedules_job_id_resume_post**](SchedulesApi.md#resume_schedule_api_v1_schedules_job_id_resume_post) | **POST** /api/v1/schedules/{job_id}/resume/ | Resume Schedule +[**update_schedule_api_v1_schedules_job_id_patch**](SchedulesApi.md#update_schedule_api_v1_schedules_job_id_patch) | **PATCH** /api/v1/schedules/{job_id}/ | Update Schedule + + + +## batch_delete_schedules_api_v1_schedules_batch_delete_post + +> batch_delete_schedules_api_v1_schedules_batch_delete_post(batch_delete_schedules_in) +Batch Delete Schedules + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**batch_delete_schedules_in** | [**BatchDeleteSchedulesIn**](BatchDeleteSchedulesIn.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## create_schedule_api_v1_schedules_post + +> models::ScheduledJobOut create_schedule_api_v1_schedules_post(scheduled_job_create) +Create Schedule + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**scheduled_job_create** | [**ScheduledJobCreate**](ScheduledJobCreate.md) | | [required] | + +### Return type + +[**models::ScheduledJobOut**](ScheduledJobOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## delete_schedule_api_v1_schedules_job_id_delete + +> delete_schedule_api_v1_schedules_job_id_delete(job_id) +Delete Schedule + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**job_id** | **String** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_schedule_api_v1_schedules_job_id_get + +> models::ScheduledJobOut get_schedule_api_v1_schedules_job_id_get(job_id) +Get Schedule + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**job_id** | **String** | | [required] | + +### Return type + +[**models::ScheduledJobOut**](ScheduledJobOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_schedules_api_v1_schedules_get + +> serde_json::Value list_schedules_api_v1_schedules_get(limit, offset, status, workflow_id) +List Schedules + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**limit** | Option<**i32**> | | |[default to 50] +**offset** | Option<**i32**> | | |[default to 0] +**status** | Option<**String**> | | | +**workflow_id** | Option<**i32**> | | | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## pause_schedule_api_v1_schedules_job_id_pause_post + +> models::ScheduledJobOut pause_schedule_api_v1_schedules_job_id_pause_post(job_id) +Pause Schedule + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**job_id** | **String** | | [required] | + +### Return type + +[**models::ScheduledJobOut**](ScheduledJobOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## resume_schedule_api_v1_schedules_job_id_resume_post + +> models::ScheduledJobOut resume_schedule_api_v1_schedules_job_id_resume_post(job_id) +Resume Schedule + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**job_id** | **String** | | [required] | + +### Return type + +[**models::ScheduledJobOut**](ScheduledJobOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## update_schedule_api_v1_schedules_job_id_patch + +> models::ScheduledJobOut update_schedule_api_v1_schedules_job_id_patch(job_id, scheduled_job_update) +Update Schedule + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**job_id** | **String** | | [required] | +**scheduled_job_update** | [**ScheduledJobUpdate**](ScheduledJobUpdate.md) | | [required] | + +### Return type + +[**models::ScheduledJobOut**](ScheduledJobOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/docs/SelfUpdateIn.md b/pipelit-client/docs/SelfUpdateIn.md new file mode 100644 index 0000000..50ab8bc --- /dev/null +++ b/pipelit-client/docs/SelfUpdateIn.md @@ -0,0 +1,13 @@ +# SelfUpdateIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | Option<**String**> | | [optional] +**first_name** | Option<**String**> | | [optional] +**last_name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/SettingsApi.md b/pipelit-client/docs/SettingsApi.md new file mode 100644 index 0000000..6bb79b3 --- /dev/null +++ b/pipelit-client/docs/SettingsApi.md @@ -0,0 +1,95 @@ +# \SettingsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_settings_api_v1_settings_get**](SettingsApi.md#get_settings_api_v1_settings_get) | **GET** /api/v1/settings/ | Get Settings +[**recheck_environment_api_v1_settings_recheck_environment_post**](SettingsApi.md#recheck_environment_api_v1_settings_recheck_environment_post) | **POST** /api/v1/settings/recheck-environment/ | Recheck Environment +[**update_settings_api_v1_settings_patch**](SettingsApi.md#update_settings_api_v1_settings_patch) | **PATCH** /api/v1/settings/ | Update Settings + + + +## get_settings_api_v1_settings_get + +> models::SettingsResponse get_settings_api_v1_settings_get() +Get Settings + +Return current platform config + cached environment info. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::SettingsResponse**](SettingsResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## recheck_environment_api_v1_settings_recheck_environment_post + +> std::collections::HashMap recheck_environment_api_v1_settings_recheck_environment_post() +Recheck Environment + +Force re-detection of environment capabilities. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## update_settings_api_v1_settings_patch + +> models::SettingsUpdateResponse update_settings_api_v1_settings_patch(settings_update) +Update Settings + +Update conf.json fields. Hot-reloads applicable settings in-process. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**settings_update** | [**SettingsUpdate**](SettingsUpdate.md) | | [required] | + +### Return type + +[**models::SettingsUpdateResponse**](SettingsUpdateResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/docs/SettingsResponse.md b/pipelit-client/docs/SettingsResponse.md new file mode 100644 index 0000000..f5d3ce3 --- /dev/null +++ b/pipelit-client/docs/SettingsResponse.md @@ -0,0 +1,12 @@ +# SettingsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config** | [**models::PlatformConfigOut**](PlatformConfigOut.md) | | +**environment** | [**models::EnvironmentInfo**](EnvironmentInfo.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/SettingsUpdate.md b/pipelit-client/docs/SettingsUpdate.md new file mode 100644 index 0000000..e2693fe --- /dev/null +++ b/pipelit-client/docs/SettingsUpdate.md @@ -0,0 +1,18 @@ +# SettingsUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sandbox_mode** | Option<**String**> | | [optional] +**database_url** | Option<**String**> | | [optional] +**redis_url** | Option<**String**> | | [optional] +**log_level** | Option<**LogLevel**> | (enum: DEBUG, INFO, WARNING, ERROR, CRITICAL) | [optional] +**log_file** | Option<**String**> | | [optional] +**platform_base_url** | Option<**String**> | | [optional] +**cors_allow_all_origins** | Option<**bool**> | | [optional] +**zombie_execution_threshold_seconds** | Option<**i32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/SettingsUpdateResponse.md b/pipelit-client/docs/SettingsUpdateResponse.md new file mode 100644 index 0000000..95c10a0 --- /dev/null +++ b/pipelit-client/docs/SettingsUpdateResponse.md @@ -0,0 +1,13 @@ +# SettingsUpdateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config** | [**models::PlatformConfigOut**](PlatformConfigOut.md) | | +**hot_reloaded** | **Vec** | | +**restart_required** | **Vec** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ShellToolInfo.md b/pipelit-client/docs/ShellToolInfo.md new file mode 100644 index 0000000..20f53e9 --- /dev/null +++ b/pipelit-client/docs/ShellToolInfo.md @@ -0,0 +1,12 @@ +# ShellToolInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**available** | **bool** | | +**tier** | **i32** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/TaskCreate.md b/pipelit-client/docs/TaskCreate.md new file mode 100644 index 0000000..bfdce09 --- /dev/null +++ b/pipelit-client/docs/TaskCreate.md @@ -0,0 +1,20 @@ +# TaskCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**epic_id** | **String** | | +**title** | **String** | | +**description** | Option<**String**> | | [optional][default to ] +**tags** | Option<**Vec**> | | [optional][default to []] +**depends_on** | Option<**Vec**> | | [optional][default to []] +**priority** | Option<**i32**> | | [optional] +**workflow_slug** | Option<**String**> | | [optional] +**estimated_tokens** | Option<**i32**> | | [optional] +**max_retries** | Option<**i32**> | | [optional][default to 2] +**requirements** | Option<**std::collections::HashMap**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/TaskOut.md b/pipelit-client/docs/TaskOut.md new file mode 100644 index 0000000..a7ad11c --- /dev/null +++ b/pipelit-client/docs/TaskOut.md @@ -0,0 +1,39 @@ +# TaskOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**epic_id** | **String** | | +**title** | **String** | | +**description** | Option<**String**> | | [optional][default to ] +**tags** | Option<**Vec**> | | [optional][default to []] +**created_by_node_id** | Option<**String**> | | [optional] +**status** | Option<**String**> | | [optional][default to pending] +**priority** | Option<**i32**> | | [optional][default to 2] +**workflow_id** | Option<**i32**> | | [optional] +**workflow_slug** | Option<**String**> | | [optional] +**execution_id** | Option<**String**> | | [optional] +**workflow_source** | Option<**String**> | | [optional][default to inline] +**depends_on** | Option<**Vec**> | | [optional][default to []] +**requirements** | Option<**std::collections::HashMap**> | | [optional] +**estimated_tokens** | Option<**i32**> | | [optional] +**actual_tokens** | Option<**i32**> | | [optional][default to 0] +**actual_usd** | Option<**f64**> | | [optional][default to 0.0] +**llm_calls** | Option<**i32**> | | [optional][default to 0] +**tool_invocations** | Option<**i32**> | | [optional][default to 0] +**duration_ms** | Option<**i32**> | | [optional][default to 0] +**created_at** | Option<**String**> | | [optional] +**updated_at** | Option<**String**> | | [optional] +**started_at** | Option<**String**> | | [optional] +**completed_at** | Option<**String**> | | [optional] +**result_summary** | Option<**String**> | | [optional] +**error_message** | Option<**String**> | | [optional] +**retry_count** | Option<**i32**> | | [optional][default to 0] +**max_retries** | Option<**i32**> | | [optional][default to 2] +**notes** | Option<**Vec**> | | [optional][default to []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/TaskUpdate.md b/pipelit-client/docs/TaskUpdate.md new file mode 100644 index 0000000..952fb8e --- /dev/null +++ b/pipelit-client/docs/TaskUpdate.md @@ -0,0 +1,20 @@ +# TaskUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**tags** | Option<**Vec**> | | [optional] +**status** | Option<**Status**> | (enum: pending, blocked, running, completed, failed, cancelled) | [optional] +**priority** | Option<**i32**> | | [optional] +**workflow_slug** | Option<**String**> | | [optional] +**execution_id** | Option<**String**> | | [optional] +**result_summary** | Option<**String**> | | [optional] +**error_message** | Option<**String**> | | [optional] +**notes** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/TasksApi.md b/pipelit-client/docs/TasksApi.md new file mode 100644 index 0000000..d59803e --- /dev/null +++ b/pipelit-client/docs/TasksApi.md @@ -0,0 +1,187 @@ +# \TasksApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**batch_delete_tasks_api_v1_tasks_batch_delete_post**](TasksApi.md#batch_delete_tasks_api_v1_tasks_batch_delete_post) | **POST** /api/v1/tasks/batch-delete/ | Batch Delete Tasks +[**create_task_api_v1_tasks_post**](TasksApi.md#create_task_api_v1_tasks_post) | **POST** /api/v1/tasks/ | Create Task +[**delete_task_api_v1_tasks_task_id_delete**](TasksApi.md#delete_task_api_v1_tasks_task_id_delete) | **DELETE** /api/v1/tasks/{task_id}/ | Delete Task +[**get_task_api_v1_tasks_task_id_get**](TasksApi.md#get_task_api_v1_tasks_task_id_get) | **GET** /api/v1/tasks/{task_id}/ | Get Task +[**list_tasks_api_v1_tasks_get**](TasksApi.md#list_tasks_api_v1_tasks_get) | **GET** /api/v1/tasks/ | List Tasks +[**update_task_api_v1_tasks_task_id_patch**](TasksApi.md#update_task_api_v1_tasks_task_id_patch) | **PATCH** /api/v1/tasks/{task_id}/ | Update Task + + + +## batch_delete_tasks_api_v1_tasks_batch_delete_post + +> batch_delete_tasks_api_v1_tasks_batch_delete_post(batch_delete_tasks_in) +Batch Delete Tasks + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**batch_delete_tasks_in** | [**BatchDeleteTasksIn**](BatchDeleteTasksIn.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## create_task_api_v1_tasks_post + +> models::TaskOut create_task_api_v1_tasks_post(task_create) +Create Task + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**task_create** | [**TaskCreate**](TaskCreate.md) | | [required] | + +### Return type + +[**models::TaskOut**](TaskOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## delete_task_api_v1_tasks_task_id_delete + +> delete_task_api_v1_tasks_task_id_delete(task_id) +Delete Task + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**task_id** | **String** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_task_api_v1_tasks_task_id_get + +> models::TaskOut get_task_api_v1_tasks_task_id_get(task_id) +Get Task + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**task_id** | **String** | | [required] | + +### Return type + +[**models::TaskOut**](TaskOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_tasks_api_v1_tasks_get + +> serde_json::Value list_tasks_api_v1_tasks_get(limit, offset, epic_id, status, tags) +List Tasks + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**limit** | Option<**i32**> | | |[default to 50] +**offset** | Option<**i32**> | | |[default to 0] +**epic_id** | Option<**String**> | | | +**status** | Option<**String**> | | | +**tags** | Option<**String**> | | | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## update_task_api_v1_tasks_task_id_patch + +> models::TaskOut update_task_api_v1_tasks_task_id_patch(task_id, task_update) +Update Task + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**task_id** | **String** | | [required] | +**task_update** | [**TaskUpdate**](TaskUpdate.md) | | [required] | + +### Return type + +[**models::TaskOut**](TaskOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/docs/TokenRequest.md b/pipelit-client/docs/TokenRequest.md new file mode 100644 index 0000000..f8bd220 --- /dev/null +++ b/pipelit-client/docs/TokenRequest.md @@ -0,0 +1,12 @@ +# TokenRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **String** | | +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/TokenResponse.md b/pipelit-client/docs/TokenResponse.md new file mode 100644 index 0000000..0850b67 --- /dev/null +++ b/pipelit-client/docs/TokenResponse.md @@ -0,0 +1,12 @@ +# TokenResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **String** | | +**requires_mfa** | Option<**bool**> | | [optional][default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/UserCreateIn.md b/pipelit-client/docs/UserCreateIn.md new file mode 100644 index 0000000..c7431c0 --- /dev/null +++ b/pipelit-client/docs/UserCreateIn.md @@ -0,0 +1,15 @@ +# UserCreateIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **String** | | +**password** | **String** | | +**role** | Option<**Role**> | (enum: admin, normal) | [optional][default to Normal] +**first_name** | Option<**String**> | | [optional] +**last_name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/UserInfo.md b/pipelit-client/docs/UserInfo.md new file mode 100644 index 0000000..054eafc --- /dev/null +++ b/pipelit-client/docs/UserInfo.md @@ -0,0 +1,13 @@ +# UserInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**username** | Option<**String**> | | [optional] +**display_name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/UserListOut.md b/pipelit-client/docs/UserListOut.md new file mode 100644 index 0000000..b83935b --- /dev/null +++ b/pipelit-client/docs/UserListOut.md @@ -0,0 +1,12 @@ +# UserListOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**Vec**](UserOut.md) | | +**total** | **i32** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/UserOut.md b/pipelit-client/docs/UserOut.md new file mode 100644 index 0000000..74eb4d9 --- /dev/null +++ b/pipelit-client/docs/UserOut.md @@ -0,0 +1,18 @@ +# UserOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **i32** | | +**username** | **String** | | +**role** | **Role** | (enum: admin, normal) | +**first_name** | **String** | | +**last_name** | **String** | | +**created_at** | **String** | | +**mfa_enabled** | **bool** | | +**key_count** | Option<**i32**> | | [optional][default to 0] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/UserUpdateIn.md b/pipelit-client/docs/UserUpdateIn.md new file mode 100644 index 0000000..0703ed7 --- /dev/null +++ b/pipelit-client/docs/UserUpdateIn.md @@ -0,0 +1,14 @@ +# UserUpdateIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role** | Option<**Role**> | (enum: admin, normal) | [optional] +**password** | Option<**String**> | | [optional] +**first_name** | Option<**String**> | | [optional] +**last_name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/UsersApi.md b/pipelit-client/docs/UsersApi.md new file mode 100644 index 0000000..959e133 --- /dev/null +++ b/pipelit-client/docs/UsersApi.md @@ -0,0 +1,383 @@ +# \UsersApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_own_key_api_v1_users_me_keys_post**](UsersApi.md#create_own_key_api_v1_users_me_keys_post) | **POST** /api/v1/users/me/keys | Create Own Key +[**create_user_api_v1_users_post**](UsersApi.md#create_user_api_v1_users_post) | **POST** /api/v1/users/ | Create User +[**create_user_key_api_v1_users_user_id_keys_post**](UsersApi.md#create_user_key_api_v1_users_user_id_keys_post) | **POST** /api/v1/users/{user_id}/keys | Create User Key +[**delete_user_api_v1_users_user_id_delete**](UsersApi.md#delete_user_api_v1_users_user_id_delete) | **DELETE** /api/v1/users/{user_id} | Delete User +[**get_own_profile_api_v1_users_me_get**](UsersApi.md#get_own_profile_api_v1_users_me_get) | **GET** /api/v1/users/me | Get Own Profile +[**get_user_api_v1_users_user_id_get**](UsersApi.md#get_user_api_v1_users_user_id_get) | **GET** /api/v1/users/{user_id} | Get User +[**list_own_keys_api_v1_users_me_keys_get**](UsersApi.md#list_own_keys_api_v1_users_me_keys_get) | **GET** /api/v1/users/me/keys | List Own Keys +[**list_user_keys_api_v1_users_user_id_keys_get**](UsersApi.md#list_user_keys_api_v1_users_user_id_keys_get) | **GET** /api/v1/users/{user_id}/keys | List User Keys +[**list_users_api_v1_users_get**](UsersApi.md#list_users_api_v1_users_get) | **GET** /api/v1/users/ | List Users +[**revoke_own_key_api_v1_users_me_keys_key_id_delete**](UsersApi.md#revoke_own_key_api_v1_users_me_keys_key_id_delete) | **DELETE** /api/v1/users/me/keys/{key_id} | Revoke Own Key +[**revoke_user_key_api_v1_users_user_id_keys_key_id_delete**](UsersApi.md#revoke_user_key_api_v1_users_user_id_keys_key_id_delete) | **DELETE** /api/v1/users/{user_id}/keys/{key_id} | Revoke User Key +[**update_own_profile_api_v1_users_me_patch**](UsersApi.md#update_own_profile_api_v1_users_me_patch) | **PATCH** /api/v1/users/me | Update Own Profile +[**update_user_api_v1_users_user_id_patch**](UsersApi.md#update_user_api_v1_users_user_id_patch) | **PATCH** /api/v1/users/{user_id} | Update User + + + +## create_own_key_api_v1_users_me_keys_post + +> models::ApiKeyCreatedOut create_own_key_api_v1_users_me_keys_post(api_key_create_in) +Create Own Key + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**api_key_create_in** | [**ApiKeyCreateIn**](ApiKeyCreateIn.md) | | [required] | + +### Return type + +[**models::ApiKeyCreatedOut**](APIKeyCreatedOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## create_user_api_v1_users_post + +> models::UserOut create_user_api_v1_users_post(user_create_in) +Create User + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_create_in** | [**UserCreateIn**](UserCreateIn.md) | | [required] | + +### Return type + +[**models::UserOut**](UserOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## create_user_key_api_v1_users_user_id_keys_post + +> models::ApiKeyCreatedOut create_user_key_api_v1_users_user_id_keys_post(user_id, api_key_create_in) +Create User Key + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**api_key_create_in** | [**ApiKeyCreateIn**](ApiKeyCreateIn.md) | | [required] | + +### Return type + +[**models::ApiKeyCreatedOut**](APIKeyCreatedOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## delete_user_api_v1_users_user_id_delete + +> delete_user_api_v1_users_user_id_delete(user_id) +Delete User + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_own_profile_api_v1_users_me_get + +> models::UserOut get_own_profile_api_v1_users_me_get() +Get Own Profile + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::UserOut**](UserOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_user_api_v1_users_user_id_get + +> models::UserOut get_user_api_v1_users_user_id_get(user_id) +Get User + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | + +### Return type + +[**models::UserOut**](UserOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_own_keys_api_v1_users_me_keys_get + +> Vec list_own_keys_api_v1_users_me_keys_get() +List Own Keys + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Vec**](APIKeyOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_user_keys_api_v1_users_user_id_keys_get + +> Vec list_user_keys_api_v1_users_user_id_keys_get(user_id) +List User Keys + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | + +### Return type + +[**Vec**](APIKeyOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_users_api_v1_users_get + +> models::UserListOut list_users_api_v1_users_get(offset, limit) +List Users + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**offset** | Option<**i32**> | | |[default to 0] +**limit** | Option<**i32**> | | |[default to 50] + +### Return type + +[**models::UserListOut**](UserListOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## revoke_own_key_api_v1_users_me_keys_key_id_delete + +> revoke_own_key_api_v1_users_me_keys_key_id_delete(key_id) +Revoke Own Key + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**key_id** | **i32** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## revoke_user_key_api_v1_users_user_id_keys_key_id_delete + +> revoke_user_key_api_v1_users_user_id_keys_key_id_delete(user_id, key_id) +Revoke User Key + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**key_id** | **i32** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## update_own_profile_api_v1_users_me_patch + +> models::UserOut update_own_profile_api_v1_users_me_patch(self_update_in) +Update Own Profile + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**self_update_in** | [**SelfUpdateIn**](SelfUpdateIn.md) | | [required] | + +### Return type + +[**models::UserOut**](UserOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## update_user_api_v1_users_user_id_patch + +> models::UserOut update_user_api_v1_users_user_id_patch(user_id, user_update_in) +Update User + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**user_update_in** | [**UserUpdateIn**](UserUpdateIn.md) | | [required] | + +### Return type + +[**models::UserOut**](UserOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/docs/ValidateDslIn.md b/pipelit-client/docs/ValidateDslIn.md new file mode 100644 index 0000000..c06a4c2 --- /dev/null +++ b/pipelit-client/docs/ValidateDslIn.md @@ -0,0 +1,11 @@ +# ValidateDslIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**yaml_str** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/ValidationError.md b/pipelit-client/docs/ValidationError.md new file mode 100644 index 0000000..d7d06bd --- /dev/null +++ b/pipelit-client/docs/ValidationError.md @@ -0,0 +1,15 @@ +# ValidationError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loc** | [**Vec**](LocationInner.md) | | +**msg** | **String** | | +**r#type** | **String** | | +**input** | Option<**serde_json::Value**> | | [optional] +**ctx** | Option<**serde_json::Value**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/WorkflowDetailOut.md b/pipelit-client/docs/WorkflowDetailOut.md new file mode 100644 index 0000000..2e9f5ca --- /dev/null +++ b/pipelit-client/docs/WorkflowDetailOut.md @@ -0,0 +1,28 @@ +# WorkflowDetailOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **i32** | | +**name** | **String** | | +**slug** | **String** | | +**description** | **String** | | +**is_active** | **bool** | | +**is_public** | **bool** | | +**is_default** | **bool** | | +**tags** | Option<**Vec**> | | [optional] +**error_handler_workflow_id** | Option<**i32**> | | [optional] +**max_execution_seconds** | Option<**i32**> | | [optional][default to 600] +**input_schema** | Option<**std::collections::HashMap**> | | [optional] +**output_schema** | Option<**std::collections::HashMap**> | | [optional] +**node_count** | Option<**i32**> | | [optional][default to 0] +**edge_count** | Option<**i32**> | | [optional][default to 0] +**created_at** | **String** | | +**updated_at** | **String** | | +**nodes** | Option<[**Vec**](NodeOut.md)> | | [optional][default to []] +**edges** | Option<[**Vec**](EdgeOut.md)> | | [optional][default to []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/WorkflowIn.md b/pipelit-client/docs/WorkflowIn.md new file mode 100644 index 0000000..57a7066 --- /dev/null +++ b/pipelit-client/docs/WorkflowIn.md @@ -0,0 +1,21 @@ +# WorkflowIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | +**slug** | **String** | | +**description** | Option<**String**> | | [optional][default to ] +**is_active** | Option<**bool**> | | [optional][default to true] +**is_public** | Option<**bool**> | | [optional][default to false] +**is_default** | Option<**bool**> | | [optional][default to false] +**tags** | Option<**Vec**> | | [optional] +**error_handler_workflow_id** | Option<**i32**> | | [optional] +**max_execution_seconds** | Option<**i32**> | | [optional][default to 600] +**input_schema** | Option<**std::collections::HashMap**> | | [optional] +**output_schema** | Option<**std::collections::HashMap**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/WorkflowOut.md b/pipelit-client/docs/WorkflowOut.md new file mode 100644 index 0000000..a21132e --- /dev/null +++ b/pipelit-client/docs/WorkflowOut.md @@ -0,0 +1,26 @@ +# WorkflowOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **i32** | | +**name** | **String** | | +**slug** | **String** | | +**description** | **String** | | +**is_active** | **bool** | | +**is_public** | **bool** | | +**is_default** | **bool** | | +**tags** | Option<**Vec**> | | [optional] +**error_handler_workflow_id** | Option<**i32**> | | [optional] +**max_execution_seconds** | Option<**i32**> | | [optional][default to 600] +**input_schema** | Option<**std::collections::HashMap**> | | [optional] +**output_schema** | Option<**std::collections::HashMap**> | | [optional] +**node_count** | Option<**i32**> | | [optional][default to 0] +**edge_count** | Option<**i32**> | | [optional][default to 0] +**created_at** | **String** | | +**updated_at** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/WorkflowUpdate.md b/pipelit-client/docs/WorkflowUpdate.md new file mode 100644 index 0000000..5512402 --- /dev/null +++ b/pipelit-client/docs/WorkflowUpdate.md @@ -0,0 +1,21 @@ +# WorkflowUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | | [optional] +**slug** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**is_active** | Option<**bool**> | | [optional] +**is_public** | Option<**bool**> | | [optional] +**is_default** | Option<**bool**> | | [optional] +**tags** | Option<**Vec**> | | [optional] +**error_handler_workflow_id** | Option<**i32**> | | [optional] +**max_execution_seconds** | Option<**i32**> | | [optional] +**input_schema** | Option<**std::collections::HashMap**> | | [optional] +**output_schema** | Option<**std::collections::HashMap**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/WorkflowsApi.md b/pipelit-client/docs/WorkflowsApi.md new file mode 100644 index 0000000..b179c40 --- /dev/null +++ b/pipelit-client/docs/WorkflowsApi.md @@ -0,0 +1,268 @@ +# \WorkflowsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**batch_delete_workflows_api_v1_workflows_batch_delete_post**](WorkflowsApi.md#batch_delete_workflows_api_v1_workflows_batch_delete_post) | **POST** /api/v1/workflows/batch-delete/ | Batch Delete Workflows +[**create_workflow_api_v1_workflows_post**](WorkflowsApi.md#create_workflow_api_v1_workflows_post) | **POST** /api/v1/workflows/ | Create Workflow +[**delete_workflow_api_v1_workflows_slug_delete**](WorkflowsApi.md#delete_workflow_api_v1_workflows_slug_delete) | **DELETE** /api/v1/workflows/{slug}/ | Delete Workflow +[**get_workflow_detail_api_v1_workflows_slug_get**](WorkflowsApi.md#get_workflow_detail_api_v1_workflows_slug_get) | **GET** /api/v1/workflows/{slug}/ | Get Workflow Detail +[**list_node_types_api_v1_workflows_node_types_get**](WorkflowsApi.md#list_node_types_api_v1_workflows_node_types_get) | **GET** /api/v1/workflows/node-types/ | List Node Types +[**list_workflows_api_v1_workflows_get**](WorkflowsApi.md#list_workflows_api_v1_workflows_get) | **GET** /api/v1/workflows/ | List Workflows +[**update_workflow_api_v1_workflows_slug_patch**](WorkflowsApi.md#update_workflow_api_v1_workflows_slug_patch) | **PATCH** /api/v1/workflows/{slug}/ | Update Workflow +[**validate_dsl_endpoint_api_v1_workflows_validate_dsl_post**](WorkflowsApi.md#validate_dsl_endpoint_api_v1_workflows_validate_dsl_post) | **POST** /api/v1/workflows/validate-dsl/ | Validate Dsl Endpoint +[**validate_workflow_api_v1_workflows_slug_validate_post**](WorkflowsApi.md#validate_workflow_api_v1_workflows_slug_validate_post) | **POST** /api/v1/workflows/{slug}/validate/ | Validate Workflow + + + +## batch_delete_workflows_api_v1_workflows_batch_delete_post + +> batch_delete_workflows_api_v1_workflows_batch_delete_post(batch_delete_workflows_in) +Batch Delete Workflows + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**batch_delete_workflows_in** | [**BatchDeleteWorkflowsIn**](BatchDeleteWorkflowsIn.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## create_workflow_api_v1_workflows_post + +> models::WorkflowOut create_workflow_api_v1_workflows_post(workflow_in) +Create Workflow + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**workflow_in** | [**WorkflowIn**](WorkflowIn.md) | | [required] | + +### Return type + +[**models::WorkflowOut**](WorkflowOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## delete_workflow_api_v1_workflows_slug_delete + +> delete_workflow_api_v1_workflows_slug_delete(slug) +Delete Workflow + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_workflow_detail_api_v1_workflows_slug_get + +> models::WorkflowDetailOut get_workflow_detail_api_v1_workflows_slug_get(slug) +Get Workflow Detail + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | + +### Return type + +[**models::WorkflowDetailOut**](WorkflowDetailOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_node_types_api_v1_workflows_node_types_get + +> serde_json::Value list_node_types_api_v1_workflows_node_types_get() +List Node Types + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**serde_json::Value**](serde_json::Value.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) + + +## list_workflows_api_v1_workflows_get + +> serde_json::Value list_workflows_api_v1_workflows_get(limit, offset) +List Workflows + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**limit** | Option<**i32**> | | |[default to 50] +**offset** | Option<**i32**> | | |[default to 0] + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## update_workflow_api_v1_workflows_slug_patch + +> models::WorkflowOut update_workflow_api_v1_workflows_slug_patch(slug, workflow_update) +Update Workflow + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | +**workflow_update** | [**WorkflowUpdate**](WorkflowUpdate.md) | | [required] | + +### Return type + +[**models::WorkflowOut**](WorkflowOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## validate_dsl_endpoint_api_v1_workflows_validate_dsl_post + +> serde_json::Value validate_dsl_endpoint_api_v1_workflows_validate_dsl_post(validate_dsl_in) +Validate Dsl Endpoint + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**validate_dsl_in** | [**ValidateDslIn**](ValidateDslIn.md) | | [required] | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## validate_workflow_api_v1_workflows_slug_validate_post + +> serde_json::Value validate_workflow_api_v1_workflows_slug_validate_post(slug) +Validate Workflow + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**slug** | **String** | | [required] | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/docs/WorkspaceEnvVar.md b/pipelit-client/docs/WorkspaceEnvVar.md new file mode 100644 index 0000000..76e1077 --- /dev/null +++ b/pipelit-client/docs/WorkspaceEnvVar.md @@ -0,0 +1,15 @@ +# WorkspaceEnvVar + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **String** | | +**value** | Option<**String**> | | [optional] +**credential_id** | Option<**i32**> | | [optional] +**credential_field** | Option<**String**> | | [optional] +**source** | Option<**Source**> | (enum: raw, credential) | [optional][default to Raw] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/WorkspaceIn.md b/pipelit-client/docs/WorkspaceIn.md new file mode 100644 index 0000000..bd7a04c --- /dev/null +++ b/pipelit-client/docs/WorkspaceIn.md @@ -0,0 +1,14 @@ +# WorkspaceIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | +**path** | Option<**String**> | | [optional] +**allow_network** | Option<**bool**> | | [optional][default to false] +**env_vars** | Option<[**Vec**](WorkspaceEnvVar.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/WorkspaceOut.md b/pipelit-client/docs/WorkspaceOut.md new file mode 100644 index 0000000..3fc5ab9 --- /dev/null +++ b/pipelit-client/docs/WorkspaceOut.md @@ -0,0 +1,16 @@ +# WorkspaceOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **i32** | | +**name** | **String** | | +**path** | **String** | | +**allow_network** | **bool** | | +**env_vars** | [**Vec**](WorkspaceEnvVar.md) | | +**created_at** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/WorkspaceUpdate.md b/pipelit-client/docs/WorkspaceUpdate.md new file mode 100644 index 0000000..c9a58f3 --- /dev/null +++ b/pipelit-client/docs/WorkspaceUpdate.md @@ -0,0 +1,12 @@ +# WorkspaceUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_network** | Option<**bool**> | | [optional] +**env_vars** | Option<[**Vec**](WorkspaceEnvVar.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pipelit-client/docs/WorkspacesApi.md b/pipelit-client/docs/WorkspacesApi.md new file mode 100644 index 0000000..7570e24 --- /dev/null +++ b/pipelit-client/docs/WorkspacesApi.md @@ -0,0 +1,244 @@ +# \WorkspacesApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**batch_delete_workspaces_api_v1_workspaces_batch_delete_post**](WorkspacesApi.md#batch_delete_workspaces_api_v1_workspaces_batch_delete_post) | **POST** /api/v1/workspaces/batch-delete/ | Batch Delete Workspaces +[**create_workspace_api_v1_workspaces_post**](WorkspacesApi.md#create_workspace_api_v1_workspaces_post) | **POST** /api/v1/workspaces/ | Create Workspace +[**delete_workspace_api_v1_workspaces_workspace_id_delete**](WorkspacesApi.md#delete_workspace_api_v1_workspaces_workspace_id_delete) | **DELETE** /api/v1/workspaces/{workspace_id}/ | Delete Workspace +[**get_workspace_api_v1_workspaces_workspace_id_get**](WorkspacesApi.md#get_workspace_api_v1_workspaces_workspace_id_get) | **GET** /api/v1/workspaces/{workspace_id}/ | Get Workspace +[**list_workspaces_api_v1_workspaces_get**](WorkspacesApi.md#list_workspaces_api_v1_workspaces_get) | **GET** /api/v1/workspaces/ | List Workspaces +[**reset_rootfs_api_v1_workspaces_workspace_id_reset_rootfs_post**](WorkspacesApi.md#reset_rootfs_api_v1_workspaces_workspace_id_reset_rootfs_post) | **POST** /api/v1/workspaces/{workspace_id}/reset-rootfs/ | Reset Rootfs +[**reset_workspace_api_v1_workspaces_workspace_id_reset_post**](WorkspacesApi.md#reset_workspace_api_v1_workspaces_workspace_id_reset_post) | **POST** /api/v1/workspaces/{workspace_id}/reset/ | Reset Workspace +[**update_workspace_api_v1_workspaces_workspace_id_patch**](WorkspacesApi.md#update_workspace_api_v1_workspaces_workspace_id_patch) | **PATCH** /api/v1/workspaces/{workspace_id}/ | Update Workspace + + + +## batch_delete_workspaces_api_v1_workspaces_batch_delete_post + +> batch_delete_workspaces_api_v1_workspaces_batch_delete_post(batch_delete_workspaces_in) +Batch Delete Workspaces + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**batch_delete_workspaces_in** | [**BatchDeleteWorkspacesIn**](BatchDeleteWorkspacesIn.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## create_workspace_api_v1_workspaces_post + +> models::WorkspaceOut create_workspace_api_v1_workspaces_post(workspace_in) +Create Workspace + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**workspace_in** | [**WorkspaceIn**](WorkspaceIn.md) | | [required] | + +### Return type + +[**models::WorkspaceOut**](WorkspaceOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## delete_workspace_api_v1_workspaces_workspace_id_delete + +> delete_workspace_api_v1_workspaces_workspace_id_delete(workspace_id) +Delete Workspace + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**workspace_id** | **i32** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_workspace_api_v1_workspaces_workspace_id_get + +> models::WorkspaceOut get_workspace_api_v1_workspaces_workspace_id_get(workspace_id) +Get Workspace + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**workspace_id** | **i32** | | [required] | + +### Return type + +[**models::WorkspaceOut**](WorkspaceOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_workspaces_api_v1_workspaces_get + +> serde_json::Value list_workspaces_api_v1_workspaces_get(limit, offset) +List Workspaces + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**limit** | Option<**i32**> | | |[default to 50] +**offset** | Option<**i32**> | | |[default to 0] + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## reset_rootfs_api_v1_workspaces_workspace_id_reset_rootfs_post + +> serde_json::Value reset_rootfs_api_v1_workspaces_workspace_id_reset_rootfs_post(workspace_id) +Reset Rootfs + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**workspace_id** | **i32** | | [required] | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## reset_workspace_api_v1_workspaces_workspace_id_reset_post + +> serde_json::Value reset_workspace_api_v1_workspaces_workspace_id_reset_post(workspace_id) +Reset Workspace + +Reset a workspace by deleting everything inside its directory and re-creating it empty. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**workspace_id** | **i32** | | [required] | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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) + + +## update_workspace_api_v1_workspaces_workspace_id_patch + +> models::WorkspaceOut update_workspace_api_v1_workspaces_workspace_id_patch(workspace_id, workspace_update) +Update Workspace + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**workspace_id** | **i32** | | [required] | +**workspace_update** | [**WorkspaceUpdate**](WorkspaceUpdate.md) | | [required] | + +### Return type + +[**models::WorkspaceOut**](WorkspaceOut.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### 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/pipelit-client/src/apis/auth_api.rs b/pipelit-client/src/apis/auth_api.rs new file mode 100644 index 0000000..7b556fc --- /dev/null +++ b/pipelit-client/src/apis/auth_api.rs @@ -0,0 +1,450 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`me_api_v1_auth_me_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum MeApiV1AuthMeGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`mfa_disable_api_v1_auth_mfa_disable_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum MfaDisableApiV1AuthMfaDisablePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`mfa_login_verify_api_v1_auth_mfa_login_verify_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum MfaLoginVerifyApiV1AuthMfaLoginVerifyPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`mfa_reset_api_v1_auth_mfa_reset_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum MfaResetApiV1AuthMfaResetPostError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`mfa_setup_api_v1_auth_mfa_setup_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum MfaSetupApiV1AuthMfaSetupPostError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`mfa_status_api_v1_auth_mfa_status_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum MfaStatusApiV1AuthMfaStatusGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`mfa_verify_api_v1_auth_mfa_verify_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum MfaVerifyApiV1AuthMfaVerifyPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`obtain_token_api_v1_auth_token_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ObtainTokenApiV1AuthTokenPostError { + Status401(), + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +pub async fn me_api_v1_auth_me_get( + configuration: &configuration::Configuration, +) -> Result> { + let uri_str = format!("{}/api/v1/auth/me/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::MeResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::MeResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +/// Disable MFA after verifying a TOTP code. +pub async fn mfa_disable_api_v1_auth_mfa_disable_post( + configuration: &configuration::Configuration, + mfa_disable_request: models::MfaDisableRequest, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_mfa_disable_request = mfa_disable_request; + + let uri_str = format!("{}/api/v1/auth/mfa/disable/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_mfa_disable_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::MfaStatusResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::MfaStatusResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +/// Complete MFA login — accepts username + TOTP code, issues API key. +pub async fn mfa_login_verify_api_v1_auth_mfa_login_verify_post( + configuration: &configuration::Configuration, + mfa_login_verify_request: models::MfaLoginVerifyRequest, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_mfa_login_verify_request = mfa_login_verify_request; + + let uri_str = format!("{}/api/v1/auth/mfa/login-verify/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_mfa_login_verify_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TokenResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TokenResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +/// Emergency MFA reset — only allowed from loopback addresses. +pub async fn mfa_reset_api_v1_auth_mfa_reset_post( + configuration: &configuration::Configuration, +) -> Result> { + let uri_str = format!("{}/api/v1/auth/mfa/reset/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::MfaStatusResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::MfaStatusResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +/// Generate a TOTP secret. Does NOT enable MFA until /mfa/verify/ is called. +pub async fn mfa_setup_api_v1_auth_mfa_setup_post( + configuration: &configuration::Configuration, +) -> Result> { + let uri_str = format!("{}/api/v1/auth/mfa/setup/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::MfaSetupResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::MfaSetupResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +/// Return current MFA status. +pub async fn mfa_status_api_v1_auth_mfa_status_get( + configuration: &configuration::Configuration, +) -> Result> { + let uri_str = format!("{}/api/v1/auth/mfa/status/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::MfaStatusResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::MfaStatusResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +/// Verify a TOTP code and enable MFA on the account. +pub async fn mfa_verify_api_v1_auth_mfa_verify_post( + configuration: &configuration::Configuration, + mfa_verify_request: models::MfaVerifyRequest, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_mfa_verify_request = mfa_verify_request; + + let uri_str = format!("{}/api/v1/auth/mfa/verify/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_mfa_verify_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::MfaStatusResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::MfaStatusResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn obtain_token_api_v1_auth_token_post( + configuration: &configuration::Configuration, + token_request: models::TokenRequest, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_token_request = token_request; + + let uri_str = format!("{}/api/v1/auth/token/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_token_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TokenResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TokenResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/chat_api.rs b/pipelit-client/src/apis/chat_api.rs new file mode 100644 index 0000000..4fc5f68 --- /dev/null +++ b/pipelit-client/src/apis/chat_api.rs @@ -0,0 +1,384 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`delete_chat_history_api_v1_workflows_slug_chat_history_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteChatHistoryApiV1WorkflowsSlugChatHistoryDeleteError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_chat_history_api_v1_workflows_slug_chat_history_delete_0`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteChatHistoryApiV1WorkflowsSlugChatHistoryDelete0Error { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_chat_history_api_v1_workflows_slug_chat_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetChatHistoryApiV1WorkflowsSlugChatHistoryGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_chat_history_api_v1_workflows_slug_chat_history_get_0`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetChatHistoryApiV1WorkflowsSlugChatHistoryGet0Error { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`send_chat_message_api_v1_workflows_slug_chat_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SendChatMessageApiV1WorkflowsSlugChatPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`send_chat_message_api_v1_workflows_slug_chat_post_0`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SendChatMessageApiV1WorkflowsSlugChatPost0Error { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// Delete chat history from LangGraph checkpoints for this workflow. +pub async fn delete_chat_history_api_v1_workflows_slug_chat_history_delete( + configuration: &configuration::Configuration, + slug: &str, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/chat/history", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +/// Delete chat history from LangGraph checkpoints for this workflow. +pub async fn delete_chat_history_api_v1_workflows_slug_chat_history_delete_0( + configuration: &configuration::Configuration, + slug: &str, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/chat/history", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +/// Load chat history from LangGraph checkpoints. Args: slug: Workflow slug limit: Max messages to return (default 10) before: ISO datetime string - only return messages before this time +pub async fn get_chat_history_api_v1_workflows_slug_chat_history_get( + configuration: &configuration::Configuration, + slug: &str, + limit: Option, + before: Option<&str>, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_query_limit = limit; + let p_query_before = before; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/chat/history", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +/// Load chat history from LangGraph checkpoints. Args: slug: Workflow slug limit: Max messages to return (default 10) before: ISO datetime string - only return messages before this time +pub async fn get_chat_history_api_v1_workflows_slug_chat_history_get_0( + configuration: &configuration::Configuration, + slug: &str, + limit: Option, + before: Option<&str>, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_query_limit = limit; + let p_query_before = before; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/chat/history", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn send_chat_message_api_v1_workflows_slug_chat_post( + configuration: &configuration::Configuration, + slug: &str, + chat_message_in: models::ChatMessageIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_body_chat_message_in = chat_message_in; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/chat/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_chat_message_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ChatMessageOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ChatMessageOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn send_chat_message_api_v1_workflows_slug_chat_post_0( + configuration: &configuration::Configuration, + slug: &str, + chat_message_in: models::ChatMessageIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_body_chat_message_in = chat_message_in; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/chat/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_chat_message_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ChatMessageOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ChatMessageOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/configuration.rs b/pipelit-client/src/apis/configuration.rs new file mode 100644 index 0000000..ed1df0b --- /dev/null +++ b/pipelit-client/src/apis/configuration.rs @@ -0,0 +1,48 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +#[derive(Debug, Clone)] +pub struct Configuration { + pub base_path: String, + pub user_agent: Option, + pub client: reqwest::Client, + pub basic_auth: Option, + pub oauth_access_token: Option, + pub bearer_access_token: Option, + pub api_key: Option, +} + +pub type BasicAuth = (String, Option); + +#[derive(Debug, Clone)] +pub struct ApiKey { + pub prefix: Option, + pub key: String, +} + +impl Configuration { + pub fn new() -> Configuration { + Configuration::default() + } +} + +impl Default for Configuration { + fn default() -> Self { + Configuration { + base_path: "http://localhost".to_owned(), + user_agent: Some("OpenAPI-Generator/0.2.0/rust".to_owned()), + client: reqwest::Client::new(), + basic_auth: None, + oauth_access_token: None, + bearer_access_token: None, + api_key: None, + } + } +} diff --git a/pipelit-client/src/apis/credentials_api.rs b/pipelit-client/src/apis/credentials_api.rs new file mode 100644 index 0000000..c834d5c --- /dev/null +++ b/pipelit-client/src/apis/credentials_api.rs @@ -0,0 +1,608 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`activate_credential_api_v1_credentials_credential_id_activate_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActivateCredentialApiV1CredentialsCredentialIdActivatePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`batch_delete_credentials_api_v1_credentials_batch_delete_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BatchDeleteCredentialsApiV1CredentialsBatchDeletePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_credential_api_v1_credentials_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateCredentialApiV1CredentialsPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`deactivate_credential_api_v1_credentials_credential_id_deactivate_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeactivateCredentialApiV1CredentialsCredentialIdDeactivatePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_credential_api_v1_credentials_credential_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteCredentialApiV1CredentialsCredentialIdDeleteError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_credential_api_v1_credentials_credential_id_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetCredentialApiV1CredentialsCredentialIdGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_credential_models_api_v1_credentials_credential_id_models_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListCredentialModelsApiV1CredentialsCredentialIdModelsGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_credentials_api_v1_credentials_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListCredentialsApiV1CredentialsGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`test_credential_api_v1_credentials_credential_id_test_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TestCredentialApiV1CredentialsCredentialIdTestPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_credential_api_v1_credentials_credential_id_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateCredentialApiV1CredentialsCredentialIdPatchError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +pub async fn activate_credential_api_v1_credentials_credential_id_activate_post( + configuration: &configuration::Configuration, + credential_id: i32, +) -> Result> +{ + // add a prefix to parameters to efficiently prevent name collisions + let p_path_credential_id = credential_id; + + let uri_str = format!( + "{}/api/v1/credentials/{credential_id}/activate/", + configuration.base_path, + credential_id = p_path_credential_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn batch_delete_credentials_api_v1_credentials_batch_delete_post( + configuration: &configuration::Configuration, + batch_delete_credentials_in: models::BatchDeleteCredentialsIn, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_batch_delete_credentials_in = batch_delete_credentials_in; + + let uri_str = format!( + "{}/api/v1/credentials/batch-delete/", + configuration.base_path + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_batch_delete_credentials_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn create_credential_api_v1_credentials_post( + configuration: &configuration::Configuration, + credential_in: models::CredentialIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_credential_in = credential_in; + + let uri_str = format!("{}/api/v1/credentials/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_credential_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CredentialOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CredentialOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn deactivate_credential_api_v1_credentials_credential_id_deactivate_post( + configuration: &configuration::Configuration, + credential_id: i32, +) -> Result< + serde_json::Value, + Error, +> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_credential_id = credential_id; + + let uri_str = format!( + "{}/api/v1/credentials/{credential_id}/deactivate/", + configuration.base_path, + credential_id = p_path_credential_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn delete_credential_api_v1_credentials_credential_id_delete( + configuration: &configuration::Configuration, + credential_id: i32, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_credential_id = credential_id; + + let uri_str = format!( + "{}/api/v1/credentials/{credential_id}/", + configuration.base_path, + credential_id = p_path_credential_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn get_credential_api_v1_credentials_credential_id_get( + configuration: &configuration::Configuration, + credential_id: i32, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_credential_id = credential_id; + + let uri_str = format!( + "{}/api/v1/credentials/{credential_id}/", + configuration.base_path, + credential_id = p_path_credential_id + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CredentialOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CredentialOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_credential_models_api_v1_credentials_credential_id_models_get( + configuration: &configuration::Configuration, + credential_id: i32, +) -> Result< + Vec, + Error, +> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_credential_id = credential_id; + + let uri_str = format!( + "{}/api/v1/credentials/{credential_id}/models/", + configuration.base_path, + credential_id = p_path_credential_id + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::CredentialModelOut>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::CredentialModelOut>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_credentials_api_v1_credentials_get( + configuration: &configuration::Configuration, + limit: Option, + offset: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_limit = limit; + let p_query_offset = offset; + + let uri_str = format!("{}/api/v1/credentials/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn test_credential_api_v1_credentials_credential_id_test_post( + configuration: &configuration::Configuration, + credential_id: i32, +) -> Result> +{ + // add a prefix to parameters to efficiently prevent name collisions + let p_path_credential_id = credential_id; + + let uri_str = format!( + "{}/api/v1/credentials/{credential_id}/test/", + configuration.base_path, + credential_id = p_path_credential_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CredentialTestOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CredentialTestOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn update_credential_api_v1_credentials_credential_id_patch( + configuration: &configuration::Configuration, + credential_id: i32, + credential_update: models::CredentialUpdate, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_credential_id = credential_id; + let p_body_credential_update = credential_update; + + let uri_str = format!( + "{}/api/v1/credentials/{credential_id}/", + configuration.base_path, + credential_id = p_path_credential_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_credential_update); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CredentialOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CredentialOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/default_api.rs b/pipelit-client/src/apis/default_api.rs new file mode 100644 index 0000000..3fc46bc --- /dev/null +++ b/pipelit-client/src/apis/default_api.rs @@ -0,0 +1,61 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`health_check_health_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum HealthCheckHealthGetError { + UnknownValue(serde_json::Value), +} + +/// Health check endpoint — no auth required. +pub async fn health_check_health_get( + configuration: &configuration::Configuration, +) -> Result> { + let uri_str = format!("{}/health", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/edges_api.rs b/pipelit-client/src/apis/edges_api.rs new file mode 100644 index 0000000..4ae9bad --- /dev/null +++ b/pipelit-client/src/apis/edges_api.rs @@ -0,0 +1,695 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`create_edge_api_v1_workflows_slug_edges_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateEdgeApiV1WorkflowsSlugEdgesPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_node_api_v1_workflows_slug_nodes_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateNodeApiV1WorkflowsSlugNodesPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_edge_api_v1_workflows_slug_edges_edge_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteEdgeApiV1WorkflowsSlugEdgesEdgeIdDeleteError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_node_api_v1_workflows_slug_nodes_node_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteNodeApiV1WorkflowsSlugNodesNodeIdDeleteError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_edges_api_v1_workflows_slug_edges_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListEdgesApiV1WorkflowsSlugEdgesGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_nodes_api_v1_workflows_slug_nodes_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListNodesApiV1WorkflowsSlugNodesGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SchedulePauseApiV1WorkflowsSlugNodesNodeIdSchedulePausePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ScheduleStartApiV1WorkflowsSlugNodesNodeIdScheduleStartPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ScheduleStopApiV1WorkflowsSlugNodesNodeIdScheduleStopPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_edge_api_v1_workflows_slug_edges_edge_id_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateEdgeApiV1WorkflowsSlugEdgesEdgeIdPatchError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_node_api_v1_workflows_slug_nodes_node_id_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateNodeApiV1WorkflowsSlugNodesNodeIdPatchError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +pub async fn create_edge_api_v1_workflows_slug_edges_post( + configuration: &configuration::Configuration, + slug: &str, + edge_in: models::EdgeIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_body_edge_in = edge_in; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/edges/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_edge_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EdgeOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EdgeOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn create_node_api_v1_workflows_slug_nodes_post( + configuration: &configuration::Configuration, + slug: &str, + node_in: models::NodeIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_body_node_in = node_in; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/nodes/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_node_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NodeOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NodeOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn delete_edge_api_v1_workflows_slug_edges_edge_id_delete( + configuration: &configuration::Configuration, + slug: &str, + edge_id: i32, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_path_edge_id = edge_id; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/edges/{edge_id}/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug), + edge_id = p_path_edge_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn delete_node_api_v1_workflows_slug_nodes_node_id_delete( + configuration: &configuration::Configuration, + slug: &str, + node_id: &str, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_path_node_id = node_id; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/nodes/{node_id}/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug), + node_id = crate::apis::urlencode(p_path_node_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_edges_api_v1_workflows_slug_edges_get( + configuration: &configuration::Configuration, + slug: &str, +) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/edges/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::EdgeOut>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::EdgeOut>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_nodes_api_v1_workflows_slug_nodes_get( + configuration: &configuration::Configuration, + slug: &str, +) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/nodes/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::NodeOut>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::NodeOut>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post( + configuration: &configuration::Configuration, + slug: &str, + node_id: &str, +) -> Result> +{ + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_path_node_id = node_id; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/nodes/{node_id}/schedule/pause/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug), + node_id = crate::apis::urlencode(p_path_node_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NodeOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NodeOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post( + configuration: &configuration::Configuration, + slug: &str, + node_id: &str, +) -> Result> +{ + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_path_node_id = node_id; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/nodes/{node_id}/schedule/start/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug), + node_id = crate::apis::urlencode(p_path_node_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NodeOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NodeOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post( + configuration: &configuration::Configuration, + slug: &str, + node_id: &str, +) -> Result> +{ + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_path_node_id = node_id; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/nodes/{node_id}/schedule/stop/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug), + node_id = crate::apis::urlencode(p_path_node_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NodeOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NodeOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn update_edge_api_v1_workflows_slug_edges_edge_id_patch( + configuration: &configuration::Configuration, + slug: &str, + edge_id: i32, + edge_update: models::EdgeUpdate, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_path_edge_id = edge_id; + let p_body_edge_update = edge_update; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/edges/{edge_id}/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug), + edge_id = p_path_edge_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_edge_update); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EdgeOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EdgeOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn update_node_api_v1_workflows_slug_nodes_node_id_patch( + configuration: &configuration::Configuration, + slug: &str, + node_id: &str, + node_update: models::NodeUpdate, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_path_node_id = node_id; + let p_body_node_update = node_update; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/nodes/{node_id}/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug), + node_id = crate::apis::urlencode(p_path_node_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_node_update); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NodeOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NodeOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/epics_api.rs b/pipelit-client/src/apis/epics_api.rs new file mode 100644 index 0000000..a7b5c4f --- /dev/null +++ b/pipelit-client/src/apis/epics_api.rs @@ -0,0 +1,431 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`batch_delete_epics_api_v1_epics_batch_delete_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BatchDeleteEpicsApiV1EpicsBatchDeletePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_epic_api_v1_epics_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateEpicApiV1EpicsPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_epic_api_v1_epics_epic_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteEpicApiV1EpicsEpicIdDeleteError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_epic_api_v1_epics_epic_id_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetEpicApiV1EpicsEpicIdGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_epic_tasks_api_v1_epics_epic_id_tasks_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListEpicTasksApiV1EpicsEpicIdTasksGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_epics_api_v1_epics_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListEpicsApiV1EpicsGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_epic_api_v1_epics_epic_id_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateEpicApiV1EpicsEpicIdPatchError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +pub async fn batch_delete_epics_api_v1_epics_batch_delete_post( + configuration: &configuration::Configuration, + batch_delete_epics_in: models::BatchDeleteEpicsIn, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_batch_delete_epics_in = batch_delete_epics_in; + + let uri_str = format!("{}/api/v1/epics/batch-delete/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_batch_delete_epics_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn create_epic_api_v1_epics_post( + configuration: &configuration::Configuration, + epic_create: models::EpicCreate, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_epic_create = epic_create; + + let uri_str = format!("{}/api/v1/epics/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_epic_create); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EpicOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EpicOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn delete_epic_api_v1_epics_epic_id_delete( + configuration: &configuration::Configuration, + epic_id: &str, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_epic_id = epic_id; + + let uri_str = format!( + "{}/api/v1/epics/{epic_id}/", + configuration.base_path, + epic_id = crate::apis::urlencode(p_path_epic_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn get_epic_api_v1_epics_epic_id_get( + configuration: &configuration::Configuration, + epic_id: &str, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_epic_id = epic_id; + + let uri_str = format!( + "{}/api/v1/epics/{epic_id}/", + configuration.base_path, + epic_id = crate::apis::urlencode(p_path_epic_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EpicOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EpicOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_epic_tasks_api_v1_epics_epic_id_tasks_get( + configuration: &configuration::Configuration, + epic_id: &str, + limit: Option, + offset: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_epic_id = epic_id; + let p_query_limit = limit; + let p_query_offset = offset; + + let uri_str = format!( + "{}/api/v1/epics/{epic_id}/tasks/", + configuration.base_path, + epic_id = crate::apis::urlencode(p_path_epic_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_epics_api_v1_epics_get( + configuration: &configuration::Configuration, + limit: Option, + offset: Option, + status: Option<&str>, + tags: Option<&str>, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_limit = limit; + let p_query_offset = offset; + let p_query_status = status; + let p_query_tags = tags; + + let uri_str = format!("{}/api/v1/epics/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_status { + req_builder = req_builder.query(&[("status", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_tags { + req_builder = req_builder.query(&[("tags", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn update_epic_api_v1_epics_epic_id_patch( + configuration: &configuration::Configuration, + epic_id: &str, + epic_update: models::EpicUpdate, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_epic_id = epic_id; + let p_body_epic_update = epic_update; + + let uri_str = format!( + "{}/api/v1/epics/{epic_id}/", + configuration.base_path, + epic_id = crate::apis::urlencode(p_path_epic_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_epic_update); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EpicOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EpicOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/executions_api.rs b/pipelit-client/src/apis/executions_api.rs new file mode 100644 index 0000000..988d25a --- /dev/null +++ b/pipelit-client/src/apis/executions_api.rs @@ -0,0 +1,257 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`batch_delete_executions_api_v1_executions_batch_delete_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BatchDeleteExecutionsApiV1ExecutionsBatchDeletePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`cancel_execution_api_v1_executions_execution_id_cancel_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CancelExecutionApiV1ExecutionsExecutionIdCancelPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_execution_api_v1_executions_execution_id_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetExecutionApiV1ExecutionsExecutionIdGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_executions_api_v1_executions_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListExecutionsApiV1ExecutionsGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +pub async fn batch_delete_executions_api_v1_executions_batch_delete_post( + configuration: &configuration::Configuration, + batch_delete_executions_in: models::BatchDeleteExecutionsIn, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_batch_delete_executions_in = batch_delete_executions_in; + + let uri_str = format!( + "{}/api/v1/executions/batch-delete/", + configuration.base_path + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_batch_delete_executions_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn cancel_execution_api_v1_executions_execution_id_cancel_post( + configuration: &configuration::Configuration, + execution_id: &str, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_execution_id = execution_id; + + let uri_str = format!( + "{}/api/v1/executions/{execution_id}/cancel/", + configuration.base_path, + execution_id = crate::apis::urlencode(p_path_execution_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ExecutionOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ExecutionOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn get_execution_api_v1_executions_execution_id_get( + configuration: &configuration::Configuration, + execution_id: &str, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_execution_id = execution_id; + + let uri_str = format!( + "{}/api/v1/executions/{execution_id}/", + configuration.base_path, + execution_id = crate::apis::urlencode(p_path_execution_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ExecutionDetailOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ExecutionDetailOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_executions_api_v1_executions_get( + configuration: &configuration::Configuration, + workflow_slug: Option<&str>, + status: Option<&str>, + limit: Option, + offset: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_workflow_slug = workflow_slug; + let p_query_status = status; + let p_query_limit = limit; + let p_query_offset = offset; + + let uri_str = format!("{}/api/v1/executions/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_workflow_slug { + req_builder = req_builder.query(&[("workflow_slug", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_status { + req_builder = req_builder.query(&[("status", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/inbound_api.rs b/pipelit-client/src/apis/inbound_api.rs new file mode 100644 index 0000000..f96cfc3 --- /dev/null +++ b/pipelit-client/src/apis/inbound_api.rs @@ -0,0 +1,132 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`inbound_webhook_api_v1_inbound_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum InboundWebhookApiV1InboundPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`inbound_webhook_api_v1_inbound_post_0`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum InboundWebhookApiV1InboundPost0Error { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// Receive a normalized message from msg-gateway and dispatch to workflow. +pub async fn inbound_webhook_api_v1_inbound_post( + configuration: &configuration::Configuration, + gateway_inbound_message: models::GatewayInboundMessage, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_gateway_inbound_message = gateway_inbound_message; + + let uri_str = format!("{}/api/v1/inbound", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_gateway_inbound_message); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +/// Receive a normalized message from msg-gateway and dispatch to workflow. +pub async fn inbound_webhook_api_v1_inbound_post_0( + configuration: &configuration::Configuration, + gateway_inbound_message: models::GatewayInboundMessage, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_gateway_inbound_message = gateway_inbound_message; + + let uri_str = format!("{}/api/v1/inbound", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_gateway_inbound_message); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/manual_api.rs b/pipelit-client/src/apis/manual_api.rs new file mode 100644 index 0000000..51ddcd7 --- /dev/null +++ b/pipelit-client/src/apis/manual_api.rs @@ -0,0 +1,137 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`execution_status_view_api_v1_executions_execution_id_status_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ExecutionStatusViewApiV1ExecutionsExecutionIdStatusGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`manual_execute_view_api_v1_workflows_workflow_slug_execute_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ManualExecuteViewApiV1WorkflowsWorkflowSlugExecutePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +pub async fn execution_status_view_api_v1_executions_execution_id_status_get( + configuration: &configuration::Configuration, + execution_id: &str, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_execution_id = execution_id; + + let uri_str = format!( + "{}/api/v1/executions/{execution_id}/status/", + configuration.base_path, + execution_id = crate::apis::urlencode(p_path_execution_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn manual_execute_view_api_v1_workflows_workflow_slug_execute_post( + configuration: &configuration::Configuration, + workflow_slug: &str, + manual_execute_in: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_workflow_slug = workflow_slug; + let p_body_manual_execute_in = manual_execute_in; + + let uri_str = format!( + "{}/api/v1/workflows/{workflow_slug}/execute/", + configuration.base_path, + workflow_slug = crate::apis::urlencode(p_path_workflow_slug) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_manual_execute_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/memories_api.rs b/pipelit-client/src/apis/memories_api.rs new file mode 100644 index 0000000..e5c530c --- /dev/null +++ b/pipelit-client/src/apis/memories_api.rs @@ -0,0 +1,604 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`batch_delete_checkpoints_api_v1_memories_checkpoints_batch_delete_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BatchDeleteCheckpointsApiV1MemoriesCheckpointsBatchDeletePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`batch_delete_episodes_api_v1_memories_episodes_batch_delete_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BatchDeleteEpisodesApiV1MemoriesEpisodesBatchDeletePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`batch_delete_facts_api_v1_memories_facts_batch_delete_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BatchDeleteFactsApiV1MemoriesFactsBatchDeletePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`batch_delete_procedures_api_v1_memories_procedures_batch_delete_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BatchDeleteProceduresApiV1MemoriesProceduresBatchDeletePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`batch_delete_users_api_v1_memories_users_batch_delete_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BatchDeleteUsersApiV1MemoriesUsersBatchDeletePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_checkpoints_api_v1_memories_checkpoints_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListCheckpointsApiV1MemoriesCheckpointsGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_episodes_api_v1_memories_episodes_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListEpisodesApiV1MemoriesEpisodesGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_facts_api_v1_memories_facts_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListFactsApiV1MemoriesFactsGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_procedures_api_v1_memories_procedures_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListProceduresApiV1MemoriesProceduresGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_users_api_v1_memories_users_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListUsersApiV1MemoriesUsersGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +pub async fn batch_delete_checkpoints_api_v1_memories_checkpoints_batch_delete_post( + configuration: &configuration::Configuration, + batch_delete_checkpoints_in: models::BatchDeleteCheckpointsIn, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_batch_delete_checkpoints_in = batch_delete_checkpoints_in; + + let uri_str = format!( + "{}/api/v1/memories/checkpoints/batch-delete/", + configuration.base_path + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_batch_delete_checkpoints_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn batch_delete_episodes_api_v1_memories_episodes_batch_delete_post( + configuration: &configuration::Configuration, + batch_delete_episodes_in: models::BatchDeleteEpisodesIn, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_batch_delete_episodes_in = batch_delete_episodes_in; + + let uri_str = format!( + "{}/api/v1/memories/episodes/batch-delete/", + configuration.base_path + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_batch_delete_episodes_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn batch_delete_facts_api_v1_memories_facts_batch_delete_post( + configuration: &configuration::Configuration, + batch_delete_facts_in: models::BatchDeleteFactsIn, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_batch_delete_facts_in = batch_delete_facts_in; + + let uri_str = format!( + "{}/api/v1/memories/facts/batch-delete/", + configuration.base_path + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_batch_delete_facts_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn batch_delete_procedures_api_v1_memories_procedures_batch_delete_post( + configuration: &configuration::Configuration, + batch_delete_procedures_in: models::BatchDeleteProceduresIn, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_batch_delete_procedures_in = batch_delete_procedures_in; + + let uri_str = format!( + "{}/api/v1/memories/procedures/batch-delete/", + configuration.base_path + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_batch_delete_procedures_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn batch_delete_users_api_v1_memories_users_batch_delete_post( + configuration: &configuration::Configuration, + batch_delete_users_in: models::BatchDeleteUsersIn, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_batch_delete_users_in = batch_delete_users_in; + + let uri_str = format!( + "{}/api/v1/memories/users/batch-delete/", + configuration.base_path + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_batch_delete_users_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_checkpoints_api_v1_memories_checkpoints_get( + configuration: &configuration::Configuration, + thread_id: Option<&str>, + limit: Option, + offset: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_thread_id = thread_id; + let p_query_limit = limit; + let p_query_offset = offset; + + let uri_str = format!("{}/api/v1/memories/checkpoints/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_thread_id { + req_builder = req_builder.query(&[("thread_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_episodes_api_v1_memories_episodes_get( + configuration: &configuration::Configuration, + agent_id: Option<&str>, + limit: Option, + offset: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_agent_id = agent_id; + let p_query_limit = limit; + let p_query_offset = offset; + + let uri_str = format!("{}/api/v1/memories/episodes/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_agent_id { + req_builder = req_builder.query(&[("agent_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_facts_api_v1_memories_facts_get( + configuration: &configuration::Configuration, + scope: Option<&str>, + fact_type: Option<&str>, + limit: Option, + offset: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_scope = scope; + let p_query_fact_type = fact_type; + let p_query_limit = limit; + let p_query_offset = offset; + + let uri_str = format!("{}/api/v1/memories/facts/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_scope { + req_builder = req_builder.query(&[("scope", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_fact_type { + req_builder = req_builder.query(&[("fact_type", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_procedures_api_v1_memories_procedures_get( + configuration: &configuration::Configuration, + agent_id: Option<&str>, + limit: Option, + offset: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_agent_id = agent_id; + let p_query_limit = limit; + let p_query_offset = offset; + + let uri_str = format!("{}/api/v1/memories/procedures/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_agent_id { + req_builder = req_builder.query(&[("agent_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_users_api_v1_memories_users_get( + configuration: &configuration::Configuration, + limit: Option, + offset: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_limit = limit; + let p_query_offset = offset; + + let uri_str = format!("{}/api/v1/memories/users/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/mod.rs b/pipelit-client/src/apis/mod.rs new file mode 100644 index 0000000..db2debc --- /dev/null +++ b/pipelit-client/src/apis/mod.rs @@ -0,0 +1,134 @@ +use std::error; +use std::fmt; + +#[derive(Debug, Clone)] +pub struct ResponseContent { + pub status: reqwest::StatusCode, + pub content: String, + pub entity: Option, +} + +#[derive(Debug)] +pub enum Error { + Reqwest(reqwest::Error), + Serde(serde_json::Error), + Io(std::io::Error), + ResponseError(ResponseContent), +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let (module, e) = match self { + Error::Reqwest(e) => ("reqwest", e.to_string()), + Error::Serde(e) => ("serde", e.to_string()), + Error::Io(e) => ("IO", e.to_string()), + Error::ResponseError(e) => ("response", format!("status code {}", e.status)), + }; + write!(f, "error in {}: {}", module, e) + } +} + +impl error::Error for Error { + fn source(&self) -> Option<&(dyn error::Error + 'static)> { + Some(match self { + Error::Reqwest(e) => e, + Error::Serde(e) => e, + Error::Io(e) => e, + Error::ResponseError(_) => return None, + }) + } +} + +impl From for Error { + fn from(e: reqwest::Error) -> Self { + Error::Reqwest(e) + } +} + +impl From for Error { + fn from(e: serde_json::Error) -> Self { + Error::Serde(e) + } +} + +impl From for Error { + fn from(e: std::io::Error) -> Self { + Error::Io(e) + } +} + +pub fn urlencode>(s: T) -> String { + ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() +} + +pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { + if let serde_json::Value::Object(object) = value { + let mut params = vec![]; + + for (key, value) in object { + match value { + serde_json::Value::Object(_) => params.append(&mut parse_deep_object( + &format!("{}[{}]", prefix, key), + value, + )), + serde_json::Value::Array(array) => { + for (i, value) in array.iter().enumerate() { + params.append(&mut parse_deep_object( + &format!("{}[{}][{}]", prefix, key, i), + value, + )); + } + } + serde_json::Value::String(s) => { + params.push((format!("{}[{}]", prefix, key), s.clone())) + } + _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), + } + } + + return params; + } + + unimplemented!("Only objects are supported with style=deepObject") +} + +/// Internal use only +/// A content type supported by this client. +#[allow(dead_code)] +enum ContentType { + Json, + Text, + Unsupported(String), +} + +impl From<&str> for ContentType { + fn from(content_type: &str) -> Self { + if content_type.starts_with("application") && content_type.contains("json") { + return Self::Json; + } else if content_type.starts_with("text/plain") { + return Self::Text; + } else { + return Self::Unsupported(content_type.to_string()); + } + } +} + +pub mod auth_api; +pub mod chat_api; +pub mod credentials_api; +pub mod default_api; +pub mod edges_api; +pub mod epics_api; +pub mod executions_api; +pub mod inbound_api; +pub mod manual_api; +pub mod memories_api; +pub mod nodes_api; +pub mod schedules_api; +pub mod settings_api; +pub mod tasks_api; +pub mod users_api; +pub mod workflows_api; +pub mod workspaces_api; + +pub mod configuration; diff --git a/pipelit-client/src/apis/nodes_api.rs b/pipelit-client/src/apis/nodes_api.rs new file mode 100644 index 0000000..4ae9bad --- /dev/null +++ b/pipelit-client/src/apis/nodes_api.rs @@ -0,0 +1,695 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`create_edge_api_v1_workflows_slug_edges_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateEdgeApiV1WorkflowsSlugEdgesPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_node_api_v1_workflows_slug_nodes_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateNodeApiV1WorkflowsSlugNodesPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_edge_api_v1_workflows_slug_edges_edge_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteEdgeApiV1WorkflowsSlugEdgesEdgeIdDeleteError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_node_api_v1_workflows_slug_nodes_node_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteNodeApiV1WorkflowsSlugNodesNodeIdDeleteError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_edges_api_v1_workflows_slug_edges_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListEdgesApiV1WorkflowsSlugEdgesGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_nodes_api_v1_workflows_slug_nodes_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListNodesApiV1WorkflowsSlugNodesGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SchedulePauseApiV1WorkflowsSlugNodesNodeIdSchedulePausePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ScheduleStartApiV1WorkflowsSlugNodesNodeIdScheduleStartPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ScheduleStopApiV1WorkflowsSlugNodesNodeIdScheduleStopPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_edge_api_v1_workflows_slug_edges_edge_id_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateEdgeApiV1WorkflowsSlugEdgesEdgeIdPatchError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_node_api_v1_workflows_slug_nodes_node_id_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateNodeApiV1WorkflowsSlugNodesNodeIdPatchError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +pub async fn create_edge_api_v1_workflows_slug_edges_post( + configuration: &configuration::Configuration, + slug: &str, + edge_in: models::EdgeIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_body_edge_in = edge_in; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/edges/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_edge_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EdgeOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EdgeOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn create_node_api_v1_workflows_slug_nodes_post( + configuration: &configuration::Configuration, + slug: &str, + node_in: models::NodeIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_body_node_in = node_in; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/nodes/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_node_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NodeOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NodeOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn delete_edge_api_v1_workflows_slug_edges_edge_id_delete( + configuration: &configuration::Configuration, + slug: &str, + edge_id: i32, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_path_edge_id = edge_id; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/edges/{edge_id}/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug), + edge_id = p_path_edge_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn delete_node_api_v1_workflows_slug_nodes_node_id_delete( + configuration: &configuration::Configuration, + slug: &str, + node_id: &str, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_path_node_id = node_id; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/nodes/{node_id}/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug), + node_id = crate::apis::urlencode(p_path_node_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_edges_api_v1_workflows_slug_edges_get( + configuration: &configuration::Configuration, + slug: &str, +) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/edges/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::EdgeOut>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::EdgeOut>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_nodes_api_v1_workflows_slug_nodes_get( + configuration: &configuration::Configuration, + slug: &str, +) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/nodes/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::NodeOut>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::NodeOut>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn schedule_pause_api_v1_workflows_slug_nodes_node_id_schedule_pause_post( + configuration: &configuration::Configuration, + slug: &str, + node_id: &str, +) -> Result> +{ + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_path_node_id = node_id; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/nodes/{node_id}/schedule/pause/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug), + node_id = crate::apis::urlencode(p_path_node_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NodeOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NodeOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn schedule_start_api_v1_workflows_slug_nodes_node_id_schedule_start_post( + configuration: &configuration::Configuration, + slug: &str, + node_id: &str, +) -> Result> +{ + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_path_node_id = node_id; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/nodes/{node_id}/schedule/start/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug), + node_id = crate::apis::urlencode(p_path_node_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NodeOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NodeOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn schedule_stop_api_v1_workflows_slug_nodes_node_id_schedule_stop_post( + configuration: &configuration::Configuration, + slug: &str, + node_id: &str, +) -> Result> +{ + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_path_node_id = node_id; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/nodes/{node_id}/schedule/stop/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug), + node_id = crate::apis::urlencode(p_path_node_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NodeOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NodeOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn update_edge_api_v1_workflows_slug_edges_edge_id_patch( + configuration: &configuration::Configuration, + slug: &str, + edge_id: i32, + edge_update: models::EdgeUpdate, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_path_edge_id = edge_id; + let p_body_edge_update = edge_update; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/edges/{edge_id}/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug), + edge_id = p_path_edge_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_edge_update); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EdgeOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EdgeOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn update_node_api_v1_workflows_slug_nodes_node_id_patch( + configuration: &configuration::Configuration, + slug: &str, + node_id: &str, + node_update: models::NodeUpdate, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_path_node_id = node_id; + let p_body_node_update = node_update; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/nodes/{node_id}/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug), + node_id = crate::apis::urlencode(p_path_node_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_node_update); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NodeOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NodeOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/schedules_api.rs b/pipelit-client/src/apis/schedules_api.rs new file mode 100644 index 0000000..4d21802 --- /dev/null +++ b/pipelit-client/src/apis/schedules_api.rs @@ -0,0 +1,487 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`batch_delete_schedules_api_v1_schedules_batch_delete_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BatchDeleteSchedulesApiV1SchedulesBatchDeletePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_schedule_api_v1_schedules_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateScheduleApiV1SchedulesPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_schedule_api_v1_schedules_job_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteScheduleApiV1SchedulesJobIdDeleteError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_schedule_api_v1_schedules_job_id_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetScheduleApiV1SchedulesJobIdGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_schedules_api_v1_schedules_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListSchedulesApiV1SchedulesGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`pause_schedule_api_v1_schedules_job_id_pause_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PauseScheduleApiV1SchedulesJobIdPausePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`resume_schedule_api_v1_schedules_job_id_resume_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ResumeScheduleApiV1SchedulesJobIdResumePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_schedule_api_v1_schedules_job_id_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateScheduleApiV1SchedulesJobIdPatchError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +pub async fn batch_delete_schedules_api_v1_schedules_batch_delete_post( + configuration: &configuration::Configuration, + batch_delete_schedules_in: models::BatchDeleteSchedulesIn, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_batch_delete_schedules_in = batch_delete_schedules_in; + + let uri_str = format!("{}/api/v1/schedules/batch-delete/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_batch_delete_schedules_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn create_schedule_api_v1_schedules_post( + configuration: &configuration::Configuration, + scheduled_job_create: models::ScheduledJobCreate, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_scheduled_job_create = scheduled_job_create; + + let uri_str = format!("{}/api/v1/schedules/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_scheduled_job_create); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ScheduledJobOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ScheduledJobOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn delete_schedule_api_v1_schedules_job_id_delete( + configuration: &configuration::Configuration, + job_id: &str, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_job_id = job_id; + + let uri_str = format!( + "{}/api/v1/schedules/{job_id}/", + configuration.base_path, + job_id = crate::apis::urlencode(p_path_job_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn get_schedule_api_v1_schedules_job_id_get( + configuration: &configuration::Configuration, + job_id: &str, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_job_id = job_id; + + let uri_str = format!( + "{}/api/v1/schedules/{job_id}/", + configuration.base_path, + job_id = crate::apis::urlencode(p_path_job_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ScheduledJobOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ScheduledJobOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_schedules_api_v1_schedules_get( + configuration: &configuration::Configuration, + limit: Option, + offset: Option, + status: Option<&str>, + workflow_id: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_limit = limit; + let p_query_offset = offset; + let p_query_status = status; + let p_query_workflow_id = workflow_id; + + let uri_str = format!("{}/api/v1/schedules/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_status { + req_builder = req_builder.query(&[("status", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_workflow_id { + req_builder = req_builder.query(&[("workflow_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn pause_schedule_api_v1_schedules_job_id_pause_post( + configuration: &configuration::Configuration, + job_id: &str, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_job_id = job_id; + + let uri_str = format!( + "{}/api/v1/schedules/{job_id}/pause/", + configuration.base_path, + job_id = crate::apis::urlencode(p_path_job_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ScheduledJobOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ScheduledJobOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn resume_schedule_api_v1_schedules_job_id_resume_post( + configuration: &configuration::Configuration, + job_id: &str, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_job_id = job_id; + + let uri_str = format!( + "{}/api/v1/schedules/{job_id}/resume/", + configuration.base_path, + job_id = crate::apis::urlencode(p_path_job_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ScheduledJobOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ScheduledJobOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn update_schedule_api_v1_schedules_job_id_patch( + configuration: &configuration::Configuration, + job_id: &str, + scheduled_job_update: models::ScheduledJobUpdate, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_job_id = job_id; + let p_body_scheduled_job_update = scheduled_job_update; + + let uri_str = format!( + "{}/api/v1/schedules/{job_id}/", + configuration.base_path, + job_id = crate::apis::urlencode(p_path_job_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_scheduled_job_update); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ScheduledJobOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ScheduledJobOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/settings_api.rs b/pipelit-client/src/apis/settings_api.rs new file mode 100644 index 0000000..df3622d --- /dev/null +++ b/pipelit-client/src/apis/settings_api.rs @@ -0,0 +1,182 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`get_settings_api_v1_settings_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSettingsApiV1SettingsGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`recheck_environment_api_v1_settings_recheck_environment_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RecheckEnvironmentApiV1SettingsRecheckEnvironmentPostError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_settings_api_v1_settings_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateSettingsApiV1SettingsPatchError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// Return current platform config + cached environment info. +pub async fn get_settings_api_v1_settings_get( + configuration: &configuration::Configuration, +) -> Result> { + let uri_str = format!("{}/api/v1/settings/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SettingsResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SettingsResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +/// Force re-detection of environment capabilities. +pub async fn recheck_environment_api_v1_settings_recheck_environment_post( + configuration: &configuration::Configuration, +) -> Result< + std::collections::HashMap, + Error, +> { + let uri_str = format!( + "{}/api/v1/settings/recheck-environment/", + configuration.base_path + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, serde_json::Value>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, serde_json::Value>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +/// Update conf.json fields. Hot-reloads applicable settings in-process. +pub async fn update_settings_api_v1_settings_patch( + configuration: &configuration::Configuration, + settings_update: models::SettingsUpdate, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_settings_update = settings_update; + + let uri_str = format!("{}/api/v1/settings/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_settings_update); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SettingsUpdateResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SettingsUpdateResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/tasks_api.rs b/pipelit-client/src/apis/tasks_api.rs new file mode 100644 index 0000000..17c131e --- /dev/null +++ b/pipelit-client/src/apis/tasks_api.rs @@ -0,0 +1,367 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`batch_delete_tasks_api_v1_tasks_batch_delete_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BatchDeleteTasksApiV1TasksBatchDeletePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_task_api_v1_tasks_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateTaskApiV1TasksPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_task_api_v1_tasks_task_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteTaskApiV1TasksTaskIdDeleteError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_task_api_v1_tasks_task_id_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTaskApiV1TasksTaskIdGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_tasks_api_v1_tasks_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListTasksApiV1TasksGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_task_api_v1_tasks_task_id_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateTaskApiV1TasksTaskIdPatchError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +pub async fn batch_delete_tasks_api_v1_tasks_batch_delete_post( + configuration: &configuration::Configuration, + batch_delete_tasks_in: models::BatchDeleteTasksIn, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_batch_delete_tasks_in = batch_delete_tasks_in; + + let uri_str = format!("{}/api/v1/tasks/batch-delete/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_batch_delete_tasks_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn create_task_api_v1_tasks_post( + configuration: &configuration::Configuration, + task_create: models::TaskCreate, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_task_create = task_create; + + let uri_str = format!("{}/api/v1/tasks/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_task_create); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn delete_task_api_v1_tasks_task_id_delete( + configuration: &configuration::Configuration, + task_id: &str, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_task_id = task_id; + + let uri_str = format!( + "{}/api/v1/tasks/{task_id}/", + configuration.base_path, + task_id = crate::apis::urlencode(p_path_task_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn get_task_api_v1_tasks_task_id_get( + configuration: &configuration::Configuration, + task_id: &str, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_task_id = task_id; + + let uri_str = format!( + "{}/api/v1/tasks/{task_id}/", + configuration.base_path, + task_id = crate::apis::urlencode(p_path_task_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_tasks_api_v1_tasks_get( + configuration: &configuration::Configuration, + limit: Option, + offset: Option, + epic_id: Option<&str>, + status: Option<&str>, + tags: Option<&str>, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_limit = limit; + let p_query_offset = offset; + let p_query_epic_id = epic_id; + let p_query_status = status; + let p_query_tags = tags; + + let uri_str = format!("{}/api/v1/tasks/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_epic_id { + req_builder = req_builder.query(&[("epic_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_status { + req_builder = req_builder.query(&[("status", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_tags { + req_builder = req_builder.query(&[("tags", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn update_task_api_v1_tasks_task_id_patch( + configuration: &configuration::Configuration, + task_id: &str, + task_update: models::TaskUpdate, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_task_id = task_id; + let p_body_task_update = task_update; + + let uri_str = format!( + "{}/api/v1/tasks/{task_id}/", + configuration.base_path, + task_id = crate::apis::urlencode(p_path_task_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_task_update); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/users_api.rs b/pipelit-client/src/apis/users_api.rs new file mode 100644 index 0000000..0db7cb5 --- /dev/null +++ b/pipelit-client/src/apis/users_api.rs @@ -0,0 +1,746 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`create_own_key_api_v1_users_me_keys_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateOwnKeyApiV1UsersMeKeysPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_user_api_v1_users_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateUserApiV1UsersPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_user_key_api_v1_users_user_id_keys_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateUserKeyApiV1UsersUserIdKeysPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_user_api_v1_users_user_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteUserApiV1UsersUserIdDeleteError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_own_profile_api_v1_users_me_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetOwnProfileApiV1UsersMeGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_user_api_v1_users_user_id_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetUserApiV1UsersUserIdGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_own_keys_api_v1_users_me_keys_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListOwnKeysApiV1UsersMeKeysGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_user_keys_api_v1_users_user_id_keys_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListUserKeysApiV1UsersUserIdKeysGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_users_api_v1_users_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListUsersApiV1UsersGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`revoke_own_key_api_v1_users_me_keys_key_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RevokeOwnKeyApiV1UsersMeKeysKeyIdDeleteError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`revoke_user_key_api_v1_users_user_id_keys_key_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RevokeUserKeyApiV1UsersUserIdKeysKeyIdDeleteError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_own_profile_api_v1_users_me_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateOwnProfileApiV1UsersMePatchError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_user_api_v1_users_user_id_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateUserApiV1UsersUserIdPatchError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +pub async fn create_own_key_api_v1_users_me_keys_post( + configuration: &configuration::Configuration, + api_key_create_in: models::ApiKeyCreateIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_api_key_create_in = api_key_create_in; + + let uri_str = format!("{}/api/v1/users/me/keys", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_api_key_create_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ApiKeyCreatedOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ApiKeyCreatedOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn create_user_api_v1_users_post( + configuration: &configuration::Configuration, + user_create_in: models::UserCreateIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_user_create_in = user_create_in; + + let uri_str = format!("{}/api/v1/users/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_user_create_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn create_user_key_api_v1_users_user_id_keys_post( + configuration: &configuration::Configuration, + user_id: i32, + api_key_create_in: models::ApiKeyCreateIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_body_api_key_create_in = api_key_create_in; + + let uri_str = format!( + "{}/api/v1/users/{user_id}/keys", + configuration.base_path, + user_id = p_path_user_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_api_key_create_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ApiKeyCreatedOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ApiKeyCreatedOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn delete_user_api_v1_users_user_id_delete( + configuration: &configuration::Configuration, + user_id: i32, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + + let uri_str = format!( + "{}/api/v1/users/{user_id}", + configuration.base_path, + user_id = p_path_user_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn get_own_profile_api_v1_users_me_get( + configuration: &configuration::Configuration, +) -> Result> { + let uri_str = format!("{}/api/v1/users/me", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn get_user_api_v1_users_user_id_get( + configuration: &configuration::Configuration, + user_id: i32, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + + let uri_str = format!( + "{}/api/v1/users/{user_id}", + configuration.base_path, + user_id = p_path_user_id + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_own_keys_api_v1_users_me_keys_get( + configuration: &configuration::Configuration, +) -> Result, Error> { + let uri_str = format!("{}/api/v1/users/me/keys", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ApiKeyOut>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ApiKeyOut>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_user_keys_api_v1_users_user_id_keys_get( + configuration: &configuration::Configuration, + user_id: i32, +) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + + let uri_str = format!( + "{}/api/v1/users/{user_id}/keys", + configuration.base_path, + user_id = p_path_user_id + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ApiKeyOut>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ApiKeyOut>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_users_api_v1_users_get( + configuration: &configuration::Configuration, + offset: Option, + limit: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_offset = offset; + let p_query_limit = limit; + + let uri_str = format!("{}/api/v1/users/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserListOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserListOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn revoke_own_key_api_v1_users_me_keys_key_id_delete( + configuration: &configuration::Configuration, + key_id: i32, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_key_id = key_id; + + let uri_str = format!( + "{}/api/v1/users/me/keys/{key_id}", + configuration.base_path, + key_id = p_path_key_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn revoke_user_key_api_v1_users_user_id_keys_key_id_delete( + configuration: &configuration::Configuration, + user_id: i32, + key_id: i32, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_key_id = key_id; + + let uri_str = format!( + "{}/api/v1/users/{user_id}/keys/{key_id}", + configuration.base_path, + user_id = p_path_user_id, + key_id = p_path_key_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn update_own_profile_api_v1_users_me_patch( + configuration: &configuration::Configuration, + self_update_in: models::SelfUpdateIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_self_update_in = self_update_in; + + let uri_str = format!("{}/api/v1/users/me", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_self_update_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn update_user_api_v1_users_user_id_patch( + configuration: &configuration::Configuration, + user_id: i32, + user_update_in: models::UserUpdateIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_body_user_update_in = user_update_in; + + let uri_str = format!( + "{}/api/v1/users/{user_id}", + configuration.base_path, + user_id = p_path_user_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_user_update_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/workflows_api.rs b/pipelit-client/src/apis/workflows_api.rs new file mode 100644 index 0000000..50ff1d6 --- /dev/null +++ b/pipelit-client/src/apis/workflows_api.rs @@ -0,0 +1,521 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`batch_delete_workflows_api_v1_workflows_batch_delete_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BatchDeleteWorkflowsApiV1WorkflowsBatchDeletePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_workflow_api_v1_workflows_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateWorkflowApiV1WorkflowsPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_workflow_api_v1_workflows_slug_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteWorkflowApiV1WorkflowsSlugDeleteError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_workflow_detail_api_v1_workflows_slug_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetWorkflowDetailApiV1WorkflowsSlugGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_node_types_api_v1_workflows_node_types_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListNodeTypesApiV1WorkflowsNodeTypesGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_workflows_api_v1_workflows_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListWorkflowsApiV1WorkflowsGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_workflow_api_v1_workflows_slug_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateWorkflowApiV1WorkflowsSlugPatchError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`validate_dsl_endpoint_api_v1_workflows_validate_dsl_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ValidateDslEndpointApiV1WorkflowsValidateDslPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`validate_workflow_api_v1_workflows_slug_validate_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ValidateWorkflowApiV1WorkflowsSlugValidatePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +pub async fn batch_delete_workflows_api_v1_workflows_batch_delete_post( + configuration: &configuration::Configuration, + batch_delete_workflows_in: models::BatchDeleteWorkflowsIn, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_batch_delete_workflows_in = batch_delete_workflows_in; + + let uri_str = format!("{}/api/v1/workflows/batch-delete/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_batch_delete_workflows_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn create_workflow_api_v1_workflows_post( + configuration: &configuration::Configuration, + workflow_in: models::WorkflowIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_workflow_in = workflow_in; + + let uri_str = format!("{}/api/v1/workflows/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_workflow_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WorkflowOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WorkflowOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn delete_workflow_api_v1_workflows_slug_delete( + configuration: &configuration::Configuration, + slug: &str, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn get_workflow_detail_api_v1_workflows_slug_get( + configuration: &configuration::Configuration, + slug: &str, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WorkflowDetailOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WorkflowDetailOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_node_types_api_v1_workflows_node_types_get( + configuration: &configuration::Configuration, +) -> Result> { + let uri_str = format!("{}/api/v1/workflows/node-types/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_workflows_api_v1_workflows_get( + configuration: &configuration::Configuration, + limit: Option, + offset: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_limit = limit; + let p_query_offset = offset; + + let uri_str = format!("{}/api/v1/workflows/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn update_workflow_api_v1_workflows_slug_patch( + configuration: &configuration::Configuration, + slug: &str, + workflow_update: models::WorkflowUpdate, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + let p_body_workflow_update = workflow_update; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_workflow_update); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WorkflowOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WorkflowOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn validate_dsl_endpoint_api_v1_workflows_validate_dsl_post( + configuration: &configuration::Configuration, + validate_dsl_in: models::ValidateDslIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_validate_dsl_in = validate_dsl_in; + + let uri_str = format!("{}/api/v1/workflows/validate-dsl/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_validate_dsl_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn validate_workflow_api_v1_workflows_slug_validate_post( + configuration: &configuration::Configuration, + slug: &str, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_slug = slug; + + let uri_str = format!( + "{}/api/v1/workflows/{slug}/validate/", + configuration.base_path, + slug = crate::apis::urlencode(p_path_slug) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/apis/workspaces_api.rs b/pipelit-client/src/apis/workspaces_api.rs new file mode 100644 index 0000000..f7d534d --- /dev/null +++ b/pipelit-client/src/apis/workspaces_api.rs @@ -0,0 +1,481 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +/// struct for typed errors of method [`batch_delete_workspaces_api_v1_workspaces_batch_delete_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BatchDeleteWorkspacesApiV1WorkspacesBatchDeletePostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_workspace_api_v1_workspaces_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateWorkspaceApiV1WorkspacesPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_workspace_api_v1_workspaces_workspace_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteWorkspaceApiV1WorkspacesWorkspaceIdDeleteError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_workspace_api_v1_workspaces_workspace_id_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetWorkspaceApiV1WorkspacesWorkspaceIdGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_workspaces_api_v1_workspaces_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListWorkspacesApiV1WorkspacesGetError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`reset_rootfs_api_v1_workspaces_workspace_id_reset_rootfs_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ResetRootfsApiV1WorkspacesWorkspaceIdResetRootfsPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`reset_workspace_api_v1_workspaces_workspace_id_reset_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ResetWorkspaceApiV1WorkspacesWorkspaceIdResetPostError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_workspace_api_v1_workspaces_workspace_id_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateWorkspaceApiV1WorkspacesWorkspaceIdPatchError { + Status422(models::HttpValidationError), + UnknownValue(serde_json::Value), +} + +pub async fn batch_delete_workspaces_api_v1_workspaces_batch_delete_post( + configuration: &configuration::Configuration, + batch_delete_workspaces_in: models::BatchDeleteWorkspacesIn, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_batch_delete_workspaces_in = batch_delete_workspaces_in; + + let uri_str = format!( + "{}/api/v1/workspaces/batch-delete/", + configuration.base_path + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_batch_delete_workspaces_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn create_workspace_api_v1_workspaces_post( + configuration: &configuration::Configuration, + workspace_in: models::WorkspaceIn, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_workspace_in = workspace_in; + + let uri_str = format!("{}/api/v1/workspaces/", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_workspace_in); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WorkspaceOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WorkspaceOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn delete_workspace_api_v1_workspaces_workspace_id_delete( + configuration: &configuration::Configuration, + workspace_id: i32, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_workspace_id = workspace_id; + + let uri_str = format!( + "{}/api/v1/workspaces/{workspace_id}/", + configuration.base_path, + workspace_id = p_path_workspace_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn get_workspace_api_v1_workspaces_workspace_id_get( + configuration: &configuration::Configuration, + workspace_id: i32, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_workspace_id = workspace_id; + + let uri_str = format!( + "{}/api/v1/workspaces/{workspace_id}/", + configuration.base_path, + workspace_id = p_path_workspace_id + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WorkspaceOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WorkspaceOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn list_workspaces_api_v1_workspaces_get( + configuration: &configuration::Configuration, + limit: Option, + offset: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_limit = limit; + let p_query_offset = offset; + + let uri_str = format!("{}/api/v1/workspaces/", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn reset_rootfs_api_v1_workspaces_workspace_id_reset_rootfs_post( + configuration: &configuration::Configuration, + workspace_id: i32, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_workspace_id = workspace_id; + + let uri_str = format!( + "{}/api/v1/workspaces/{workspace_id}/reset-rootfs/", + configuration.base_path, + workspace_id = p_path_workspace_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +/// Reset a workspace by deleting everything inside its directory and re-creating it empty. +pub async fn reset_workspace_api_v1_workspaces_workspace_id_reset_post( + configuration: &configuration::Configuration, + workspace_id: i32, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_workspace_id = workspace_id; + + let uri_str = format!( + "{}/api/v1/workspaces/{workspace_id}/reset/", + configuration.base_path, + workspace_id = p_path_workspace_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn update_workspace_api_v1_workspaces_workspace_id_patch( + configuration: &configuration::Configuration, + workspace_id: i32, + workspace_update: models::WorkspaceUpdate, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_workspace_id = workspace_id; + let p_body_workspace_update = workspace_update; + + let uri_str = format!( + "{}/api/v1/workspaces/{workspace_id}/", + configuration.base_path, + workspace_id = p_path_workspace_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_workspace_update); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WorkspaceOut`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WorkspaceOut`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/pipelit-client/src/lib.rs b/pipelit-client/src/lib.rs new file mode 100644 index 0000000..9556a0a --- /dev/null +++ b/pipelit-client/src/lib.rs @@ -0,0 +1,11 @@ +#![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] + +extern crate reqwest; +extern crate serde; +extern crate serde_json; +extern crate serde_repr; +extern crate url; + +pub mod apis; +pub mod models; diff --git a/pipelit-client/src/models/api_key_create_in.rs b/pipelit-client/src/models/api_key_create_in.rs new file mode 100644 index 0000000..cede298 --- /dev/null +++ b/pipelit-client/src/models/api_key_create_in.rs @@ -0,0 +1,34 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiKeyCreateIn { + #[serde(rename = "name")] + pub name: String, + #[serde( + rename = "expires_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub expires_at: Option>, +} + +impl ApiKeyCreateIn { + pub fn new(name: String) -> ApiKeyCreateIn { + ApiKeyCreateIn { + name, + expires_at: None, + } + } +} diff --git a/pipelit-client/src/models/api_key_created_out.rs b/pipelit-client/src/models/api_key_created_out.rs new file mode 100644 index 0000000..eae63de --- /dev/null +++ b/pipelit-client/src/models/api_key_created_out.rs @@ -0,0 +1,64 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiKeyCreatedOut { + #[serde(rename = "id")] + pub id: i32, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "prefix")] + pub prefix: String, + #[serde(rename = "created_at")] + pub created_at: String, + #[serde( + rename = "last_used_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub last_used_at: Option>, + #[serde( + rename = "expires_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub expires_at: Option>, + #[serde(rename = "is_active")] + pub is_active: bool, + #[serde(rename = "key")] + pub key: String, +} + +impl ApiKeyCreatedOut { + pub fn new( + id: i32, + name: String, + prefix: String, + created_at: String, + is_active: bool, + key: String, + ) -> ApiKeyCreatedOut { + ApiKeyCreatedOut { + id, + name, + prefix, + created_at, + last_used_at: None, + expires_at: None, + is_active, + key, + } + } +} diff --git a/pipelit-client/src/models/api_key_out.rs b/pipelit-client/src/models/api_key_out.rs new file mode 100644 index 0000000..ed74b87 --- /dev/null +++ b/pipelit-client/src/models/api_key_out.rs @@ -0,0 +1,60 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiKeyOut { + #[serde(rename = "id")] + pub id: i32, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "prefix")] + pub prefix: String, + #[serde(rename = "created_at")] + pub created_at: String, + #[serde( + rename = "last_used_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub last_used_at: Option>, + #[serde( + rename = "expires_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub expires_at: Option>, + #[serde(rename = "is_active")] + pub is_active: bool, +} + +impl ApiKeyOut { + pub fn new( + id: i32, + name: String, + prefix: String, + created_at: String, + is_active: bool, + ) -> ApiKeyOut { + ApiKeyOut { + id, + name, + prefix, + created_at, + last_used_at: None, + expires_at: None, + is_active, + } + } +} diff --git a/pipelit-client/src/models/batch_delete_checkpoints_in.rs b/pipelit-client/src/models/batch_delete_checkpoints_in.rs new file mode 100644 index 0000000..3f18d96 --- /dev/null +++ b/pipelit-client/src/models/batch_delete_checkpoints_in.rs @@ -0,0 +1,39 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BatchDeleteCheckpointsIn { + #[serde( + rename = "thread_ids", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub thread_ids: Option>>, + #[serde( + rename = "checkpoint_ids", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub checkpoint_ids: Option>>, +} + +impl BatchDeleteCheckpointsIn { + pub fn new() -> BatchDeleteCheckpointsIn { + BatchDeleteCheckpointsIn { + thread_ids: None, + checkpoint_ids: None, + } + } +} diff --git a/pipelit-client/src/models/batch_delete_credentials_in.rs b/pipelit-client/src/models/batch_delete_credentials_in.rs new file mode 100644 index 0000000..20fc428 --- /dev/null +++ b/pipelit-client/src/models/batch_delete_credentials_in.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BatchDeleteCredentialsIn { + #[serde(rename = "ids")] + pub ids: Vec, +} + +impl BatchDeleteCredentialsIn { + pub fn new(ids: Vec) -> BatchDeleteCredentialsIn { + BatchDeleteCredentialsIn { ids } + } +} diff --git a/pipelit-client/src/models/batch_delete_epics_in.rs b/pipelit-client/src/models/batch_delete_epics_in.rs new file mode 100644 index 0000000..e717e98 --- /dev/null +++ b/pipelit-client/src/models/batch_delete_epics_in.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BatchDeleteEpicsIn { + #[serde(rename = "epic_ids")] + pub epic_ids: Vec, +} + +impl BatchDeleteEpicsIn { + pub fn new(epic_ids: Vec) -> BatchDeleteEpicsIn { + BatchDeleteEpicsIn { epic_ids } + } +} diff --git a/pipelit-client/src/models/batch_delete_episodes_in.rs b/pipelit-client/src/models/batch_delete_episodes_in.rs new file mode 100644 index 0000000..9735865 --- /dev/null +++ b/pipelit-client/src/models/batch_delete_episodes_in.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BatchDeleteEpisodesIn { + #[serde(rename = "ids")] + pub ids: Vec, +} + +impl BatchDeleteEpisodesIn { + pub fn new(ids: Vec) -> BatchDeleteEpisodesIn { + BatchDeleteEpisodesIn { ids } + } +} diff --git a/pipelit-client/src/models/batch_delete_executions_in.rs b/pipelit-client/src/models/batch_delete_executions_in.rs new file mode 100644 index 0000000..5ec3b11 --- /dev/null +++ b/pipelit-client/src/models/batch_delete_executions_in.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BatchDeleteExecutionsIn { + #[serde(rename = "execution_ids")] + pub execution_ids: Vec, +} + +impl BatchDeleteExecutionsIn { + pub fn new(execution_ids: Vec) -> BatchDeleteExecutionsIn { + BatchDeleteExecutionsIn { execution_ids } + } +} diff --git a/pipelit-client/src/models/batch_delete_facts_in.rs b/pipelit-client/src/models/batch_delete_facts_in.rs new file mode 100644 index 0000000..92a0c33 --- /dev/null +++ b/pipelit-client/src/models/batch_delete_facts_in.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BatchDeleteFactsIn { + #[serde(rename = "ids")] + pub ids: Vec, +} + +impl BatchDeleteFactsIn { + pub fn new(ids: Vec) -> BatchDeleteFactsIn { + BatchDeleteFactsIn { ids } + } +} diff --git a/pipelit-client/src/models/batch_delete_procedures_in.rs b/pipelit-client/src/models/batch_delete_procedures_in.rs new file mode 100644 index 0000000..81bbd1d --- /dev/null +++ b/pipelit-client/src/models/batch_delete_procedures_in.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BatchDeleteProceduresIn { + #[serde(rename = "ids")] + pub ids: Vec, +} + +impl BatchDeleteProceduresIn { + pub fn new(ids: Vec) -> BatchDeleteProceduresIn { + BatchDeleteProceduresIn { ids } + } +} diff --git a/pipelit-client/src/models/batch_delete_schedules_in.rs b/pipelit-client/src/models/batch_delete_schedules_in.rs new file mode 100644 index 0000000..fb62b7c --- /dev/null +++ b/pipelit-client/src/models/batch_delete_schedules_in.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BatchDeleteSchedulesIn { + #[serde(rename = "schedule_ids")] + pub schedule_ids: Vec, +} + +impl BatchDeleteSchedulesIn { + pub fn new(schedule_ids: Vec) -> BatchDeleteSchedulesIn { + BatchDeleteSchedulesIn { schedule_ids } + } +} diff --git a/pipelit-client/src/models/batch_delete_tasks_in.rs b/pipelit-client/src/models/batch_delete_tasks_in.rs new file mode 100644 index 0000000..11d919d --- /dev/null +++ b/pipelit-client/src/models/batch_delete_tasks_in.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BatchDeleteTasksIn { + #[serde(rename = "task_ids")] + pub task_ids: Vec, +} + +impl BatchDeleteTasksIn { + pub fn new(task_ids: Vec) -> BatchDeleteTasksIn { + BatchDeleteTasksIn { task_ids } + } +} diff --git a/pipelit-client/src/models/batch_delete_users_in.rs b/pipelit-client/src/models/batch_delete_users_in.rs new file mode 100644 index 0000000..236dcf0 --- /dev/null +++ b/pipelit-client/src/models/batch_delete_users_in.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BatchDeleteUsersIn { + #[serde(rename = "ids")] + pub ids: Vec, +} + +impl BatchDeleteUsersIn { + pub fn new(ids: Vec) -> BatchDeleteUsersIn { + BatchDeleteUsersIn { ids } + } +} diff --git a/pipelit-client/src/models/batch_delete_workflows_in.rs b/pipelit-client/src/models/batch_delete_workflows_in.rs new file mode 100644 index 0000000..6f9999d --- /dev/null +++ b/pipelit-client/src/models/batch_delete_workflows_in.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BatchDeleteWorkflowsIn { + #[serde(rename = "slugs")] + pub slugs: Vec, +} + +impl BatchDeleteWorkflowsIn { + pub fn new(slugs: Vec) -> BatchDeleteWorkflowsIn { + BatchDeleteWorkflowsIn { slugs } + } +} diff --git a/pipelit-client/src/models/batch_delete_workspaces_in.rs b/pipelit-client/src/models/batch_delete_workspaces_in.rs new file mode 100644 index 0000000..bacca23 --- /dev/null +++ b/pipelit-client/src/models/batch_delete_workspaces_in.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BatchDeleteWorkspacesIn { + #[serde(rename = "ids")] + pub ids: Vec, +} + +impl BatchDeleteWorkspacesIn { + pub fn new(ids: Vec) -> BatchDeleteWorkspacesIn { + BatchDeleteWorkspacesIn { ids } + } +} diff --git a/pipelit-client/src/models/capabilities_info.rs b/pipelit-client/src/models/capabilities_info.rs new file mode 100644 index 0000000..fdf3071 --- /dev/null +++ b/pipelit-client/src/models/capabilities_info.rs @@ -0,0 +1,36 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CapabilitiesInfo { + #[serde(rename = "runtimes")] + pub runtimes: std::collections::HashMap, + #[serde(rename = "shell_tools")] + pub shell_tools: std::collections::HashMap, + #[serde(rename = "network")] + pub network: Box, +} + +impl CapabilitiesInfo { + pub fn new( + runtimes: std::collections::HashMap, + shell_tools: std::collections::HashMap, + network: models::NetworkInfo, + ) -> CapabilitiesInfo { + CapabilitiesInfo { + runtimes, + shell_tools, + network: Box::new(network), + } + } +} diff --git a/pipelit-client/src/models/chat_message_in.rs b/pipelit-client/src/models/chat_message_in.rs new file mode 100644 index 0000000..93fbff9 --- /dev/null +++ b/pipelit-client/src/models/chat_message_in.rs @@ -0,0 +1,34 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ChatMessageIn { + #[serde(rename = "text")] + pub text: String, + #[serde( + rename = "trigger_node_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub trigger_node_id: Option>, +} + +impl ChatMessageIn { + pub fn new(text: String) -> ChatMessageIn { + ChatMessageIn { + text, + trigger_node_id: None, + } + } +} diff --git a/pipelit-client/src/models/chat_message_out.rs b/pipelit-client/src/models/chat_message_out.rs new file mode 100644 index 0000000..0b76a70 --- /dev/null +++ b/pipelit-client/src/models/chat_message_out.rs @@ -0,0 +1,32 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ChatMessageOut { + #[serde(rename = "execution_id")] + pub execution_id: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "response")] + pub response: String, +} + +impl ChatMessageOut { + pub fn new(execution_id: String, status: String, response: String) -> ChatMessageOut { + ChatMessageOut { + execution_id, + status, + response, + } + } +} diff --git a/pipelit-client/src/models/component_config_data.rs b/pipelit-client/src/models/component_config_data.rs new file mode 100644 index 0000000..b226eb5 --- /dev/null +++ b/pipelit-client/src/models/component_config_data.rs @@ -0,0 +1,129 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ComponentConfigData { + #[serde(rename = "system_prompt", skip_serializing_if = "Option::is_none")] + pub system_prompt: Option, + #[serde(rename = "extra_config", skip_serializing_if = "Option::is_none")] + pub extra_config: Option>, + #[serde( + rename = "llm_credential_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub llm_credential_id: Option>, + #[serde(rename = "model_name", skip_serializing_if = "Option::is_none")] + pub model_name: Option, + #[serde( + rename = "temperature", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub temperature: Option>, + #[serde( + rename = "max_tokens", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub max_tokens: Option>, + #[serde( + rename = "frequency_penalty", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub frequency_penalty: Option>, + #[serde( + rename = "presence_penalty", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub presence_penalty: Option>, + #[serde( + rename = "top_p", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub top_p: Option>, + #[serde( + rename = "timeout", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub timeout: Option>, + #[serde( + rename = "max_retries", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub max_retries: Option>, + #[serde( + rename = "response_format", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub response_format: Option>>, + #[serde( + rename = "llm_model_config_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub llm_model_config_id: Option>, + #[serde( + rename = "credential_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub credential_id: Option>, + #[serde(rename = "is_active", skip_serializing_if = "Option::is_none")] + pub is_active: Option, + #[serde(rename = "priority", skip_serializing_if = "Option::is_none")] + pub priority: Option, + #[serde(rename = "trigger_config", skip_serializing_if = "Option::is_none")] + pub trigger_config: Option>, +} + +impl ComponentConfigData { + pub fn new() -> ComponentConfigData { + ComponentConfigData { + system_prompt: None, + extra_config: None, + llm_credential_id: None, + model_name: None, + temperature: None, + max_tokens: None, + frequency_penalty: None, + presence_penalty: None, + top_p: None, + timeout: None, + max_retries: None, + response_format: None, + llm_model_config_id: None, + credential_id: None, + is_active: None, + priority: None, + trigger_config: None, + } + } +} diff --git a/pipelit-client/src/models/credential_in.rs b/pipelit-client/src/models/credential_in.rs new file mode 100644 index 0000000..f82fa43 --- /dev/null +++ b/pipelit-client/src/models/credential_in.rs @@ -0,0 +1,55 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CredentialIn { + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "credential_type")] + pub credential_type: CredentialType, + #[serde( + rename = "detail", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub detail: Option>>, +} + +impl CredentialIn { + pub fn new(name: String, credential_type: CredentialType) -> CredentialIn { + CredentialIn { + name, + credential_type, + detail: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CredentialType { + #[serde(rename = "git")] + Git, + #[serde(rename = "llm")] + Llm, + #[serde(rename = "gateway")] + Gateway, + #[serde(rename = "tool")] + Tool, +} + +impl Default for CredentialType { + fn default() -> CredentialType { + Self::Git + } +} diff --git a/pipelit-client/src/models/credential_model_out.rs b/pipelit-client/src/models/credential_model_out.rs new file mode 100644 index 0000000..fce5008 --- /dev/null +++ b/pipelit-client/src/models/credential_model_out.rs @@ -0,0 +1,26 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CredentialModelOut { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "name")] + pub name: String, +} + +impl CredentialModelOut { + pub fn new(id: String, name: String) -> CredentialModelOut { + CredentialModelOut { id, name } + } +} diff --git a/pipelit-client/src/models/credential_out.rs b/pipelit-client/src/models/credential_out.rs new file mode 100644 index 0000000..cc2b412 --- /dev/null +++ b/pipelit-client/src/models/credential_out.rs @@ -0,0 +1,70 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CredentialOut { + #[serde(rename = "id")] + pub id: i32, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "credential_type")] + pub credential_type: CredentialType, + #[serde( + rename = "detail", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub detail: Option>>, + #[serde(rename = "created_at")] + pub created_at: String, + #[serde(rename = "updated_at")] + pub updated_at: String, +} + +impl CredentialOut { + pub fn new( + id: i32, + name: String, + credential_type: CredentialType, + created_at: String, + updated_at: String, + ) -> CredentialOut { + CredentialOut { + id, + name, + credential_type, + detail: None, + created_at, + updated_at, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CredentialType { + #[serde(rename = "git")] + Git, + #[serde(rename = "llm")] + Llm, + #[serde(rename = "gateway")] + Gateway, + #[serde(rename = "tool")] + Tool, +} + +impl Default for CredentialType { + fn default() -> CredentialType { + Self::Git + } +} diff --git a/pipelit-client/src/models/credential_test_out.rs b/pipelit-client/src/models/credential_test_out.rs new file mode 100644 index 0000000..cf78e24 --- /dev/null +++ b/pipelit-client/src/models/credential_test_out.rs @@ -0,0 +1,37 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CredentialTestOut { + #[serde(rename = "ok")] + pub ok: bool, + #[serde(rename = "error", skip_serializing_if = "Option::is_none")] + pub error: Option, + #[serde( + rename = "detail", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub detail: Option>>, +} + +impl CredentialTestOut { + pub fn new(ok: bool) -> CredentialTestOut { + CredentialTestOut { + ok, + error: None, + detail: None, + } + } +} diff --git a/pipelit-client/src/models/credential_update.rs b/pipelit-client/src/models/credential_update.rs new file mode 100644 index 0000000..c4061c5 --- /dev/null +++ b/pipelit-client/src/models/credential_update.rs @@ -0,0 +1,39 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CredentialUpdate { + #[serde( + rename = "name", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub name: Option>, + #[serde( + rename = "detail", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub detail: Option>>, +} + +impl CredentialUpdate { + pub fn new() -> CredentialUpdate { + CredentialUpdate { + name: None, + detail: None, + } + } +} diff --git a/pipelit-client/src/models/detail.rs b/pipelit-client/src/models/detail.rs new file mode 100644 index 0000000..a218302 --- /dev/null +++ b/pipelit-client/src/models/detail.rs @@ -0,0 +1,21 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Detail {} + +impl Detail { + pub fn new() -> Detail { + Detail {} + } +} diff --git a/pipelit-client/src/models/edge_in.rs b/pipelit-client/src/models/edge_in.rs new file mode 100644 index 0000000..39268d0 --- /dev/null +++ b/pipelit-client/src/models/edge_in.rs @@ -0,0 +1,87 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EdgeIn { + #[serde(rename = "source_node_id")] + pub source_node_id: String, + #[serde(rename = "target_node_id", skip_serializing_if = "Option::is_none")] + pub target_node_id: Option, + #[serde(rename = "edge_type", skip_serializing_if = "Option::is_none")] + pub edge_type: Option, + #[serde(rename = "edge_label", skip_serializing_if = "Option::is_none")] + pub edge_label: Option, + #[serde( + rename = "condition_mapping", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub condition_mapping: Option>>, + #[serde(rename = "condition_value", skip_serializing_if = "Option::is_none")] + pub condition_value: Option, + #[serde(rename = "priority", skip_serializing_if = "Option::is_none")] + pub priority: Option, +} + +impl EdgeIn { + pub fn new(source_node_id: String) -> EdgeIn { + EdgeIn { + source_node_id, + target_node_id: None, + edge_type: None, + edge_label: None, + condition_mapping: None, + condition_value: None, + priority: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum EdgeType { + #[serde(rename = "direct")] + Direct, + #[serde(rename = "conditional")] + Conditional, +} + +impl Default for EdgeType { + fn default() -> EdgeType { + Self::Direct + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum EdgeLabel { + #[serde(rename = "")] + Empty, + #[serde(rename = "llm")] + Llm, + #[serde(rename = "tool")] + Tool, + #[serde(rename = "output_parser")] + OutputParser, + #[serde(rename = "loop_body")] + LoopBody, + #[serde(rename = "loop_return")] + LoopReturn, + #[serde(rename = "skill")] + Skill, +} + +impl Default for EdgeLabel { + fn default() -> EdgeLabel { + Self::Empty + } +} diff --git a/pipelit-client/src/models/edge_out.rs b/pipelit-client/src/models/edge_out.rs new file mode 100644 index 0000000..82af2e2 --- /dev/null +++ b/pipelit-client/src/models/edge_out.rs @@ -0,0 +1,96 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EdgeOut { + #[serde(rename = "id")] + pub id: i32, + #[serde(rename = "source_node_id")] + pub source_node_id: String, + #[serde(rename = "target_node_id")] + pub target_node_id: String, + #[serde(rename = "edge_type")] + pub edge_type: EdgeType, + #[serde(rename = "edge_label", skip_serializing_if = "Option::is_none")] + pub edge_label: Option, + #[serde( + rename = "condition_mapping", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub condition_mapping: Option>>, + #[serde(rename = "condition_value", skip_serializing_if = "Option::is_none")] + pub condition_value: Option, + #[serde(rename = "priority")] + pub priority: i32, +} + +impl EdgeOut { + pub fn new( + id: i32, + source_node_id: String, + target_node_id: String, + edge_type: EdgeType, + priority: i32, + ) -> EdgeOut { + EdgeOut { + id, + source_node_id, + target_node_id, + edge_type, + edge_label: None, + condition_mapping: None, + condition_value: None, + priority, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum EdgeType { + #[serde(rename = "direct")] + Direct, + #[serde(rename = "conditional")] + Conditional, +} + +impl Default for EdgeType { + fn default() -> EdgeType { + Self::Direct + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum EdgeLabel { + #[serde(rename = "")] + Empty, + #[serde(rename = "llm")] + Llm, + #[serde(rename = "tool")] + Tool, + #[serde(rename = "output_parser")] + OutputParser, + #[serde(rename = "loop_body")] + LoopBody, + #[serde(rename = "loop_return")] + LoopReturn, + #[serde(rename = "skill")] + Skill, +} + +impl Default for EdgeLabel { + fn default() -> EdgeLabel { + Self::Empty + } +} diff --git a/pipelit-client/src/models/edge_update.rs b/pipelit-client/src/models/edge_update.rs new file mode 100644 index 0000000..f7cb35f --- /dev/null +++ b/pipelit-client/src/models/edge_update.rs @@ -0,0 +1,117 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EdgeUpdate { + #[serde( + rename = "source_node_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub source_node_id: Option>, + #[serde( + rename = "target_node_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub target_node_id: Option>, + #[serde( + rename = "edge_type", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub edge_type: Option>, + #[serde( + rename = "edge_label", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub edge_label: Option>, + #[serde( + rename = "condition_mapping", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub condition_mapping: Option>>, + #[serde( + rename = "condition_value", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub condition_value: Option>, + #[serde( + rename = "priority", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub priority: Option>, +} + +impl EdgeUpdate { + pub fn new() -> EdgeUpdate { + EdgeUpdate { + source_node_id: None, + target_node_id: None, + edge_type: None, + edge_label: None, + condition_mapping: None, + condition_value: None, + priority: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum EdgeType { + #[serde(rename = "direct")] + Direct, + #[serde(rename = "conditional")] + Conditional, +} + +impl Default for EdgeType { + fn default() -> EdgeType { + Self::Direct + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum EdgeLabel { + #[serde(rename = "")] + Empty, + #[serde(rename = "llm")] + Llm, + #[serde(rename = "tool")] + Tool, + #[serde(rename = "output_parser")] + OutputParser, + #[serde(rename = "loop_body")] + LoopBody, + #[serde(rename = "loop_return")] + LoopReturn, + #[serde(rename = "skill")] + Skill, +} + +impl Default for EdgeLabel { + fn default() -> EdgeLabel { + Self::Empty + } +} diff --git a/pipelit-client/src/models/environment_info.rs b/pipelit-client/src/models/environment_info.rs new file mode 100644 index 0000000..1255b49 --- /dev/null +++ b/pipelit-client/src/models/environment_info.rs @@ -0,0 +1,68 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EnvironmentInfo { + #[serde(rename = "os")] + pub os: String, + #[serde(rename = "arch")] + pub arch: String, + #[serde( + rename = "container", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub container: Option>, + #[serde(rename = "bwrap_available")] + pub bwrap_available: bool, + #[serde(rename = "rootfs_ready")] + pub rootfs_ready: bool, + #[serde(rename = "sandbox_mode")] + pub sandbox_mode: String, + #[serde(rename = "capabilities")] + pub capabilities: Box, + #[serde(rename = "tier1_met")] + pub tier1_met: bool, + #[serde(rename = "tier2_warnings")] + pub tier2_warnings: Vec, + #[serde(rename = "gate")] + pub gate: Box, +} + +impl EnvironmentInfo { + pub fn new( + os: String, + arch: String, + bwrap_available: bool, + rootfs_ready: bool, + sandbox_mode: String, + capabilities: models::CapabilitiesInfo, + tier1_met: bool, + tier2_warnings: Vec, + gate: models::GateResult, + ) -> EnvironmentInfo { + EnvironmentInfo { + os, + arch, + container: None, + bwrap_available, + rootfs_ready, + sandbox_mode, + capabilities: Box::new(capabilities), + tier1_met, + tier2_warnings, + gate: Box::new(gate), + } + } +} diff --git a/pipelit-client/src/models/epic_create.rs b/pipelit-client/src/models/epic_create.rs new file mode 100644 index 0000000..858fd18 --- /dev/null +++ b/pipelit-client/src/models/epic_create.rs @@ -0,0 +1,59 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EpicCreate { + #[serde(rename = "title")] + pub title: String, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, + #[serde(rename = "priority", skip_serializing_if = "Option::is_none")] + pub priority: Option, + #[serde( + rename = "budget_tokens", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub budget_tokens: Option>, + #[serde( + rename = "budget_usd", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub budget_usd: Option>, + #[serde( + rename = "workflow_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub workflow_id: Option>, +} + +impl EpicCreate { + pub fn new(title: String) -> EpicCreate { + EpicCreate { + title, + description: None, + tags: None, + priority: None, + budget_tokens: None, + budget_usd: None, + workflow_id: None, + } + } +} diff --git a/pipelit-client/src/models/epic_out.rs b/pipelit-client/src/models/epic_out.rs new file mode 100644 index 0000000..001918b --- /dev/null +++ b/pipelit-client/src/models/epic_out.rs @@ -0,0 +1,137 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EpicOut { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "title")] + pub title: String, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, + #[serde( + rename = "created_by_node_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub created_by_node_id: Option>, + #[serde( + rename = "workflow_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub workflow_id: Option>, + #[serde( + rename = "user_profile_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub user_profile_id: Option>, + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, + #[serde(rename = "priority", skip_serializing_if = "Option::is_none")] + pub priority: Option, + #[serde( + rename = "budget_tokens", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub budget_tokens: Option>, + #[serde( + rename = "budget_usd", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub budget_usd: Option>, + #[serde(rename = "spent_tokens", skip_serializing_if = "Option::is_none")] + pub spent_tokens: Option, + #[serde(rename = "spent_usd", skip_serializing_if = "Option::is_none")] + pub spent_usd: Option, + #[serde( + rename = "agent_overhead_tokens", + skip_serializing_if = "Option::is_none" + )] + pub agent_overhead_tokens: Option, + #[serde(rename = "agent_overhead_usd", skip_serializing_if = "Option::is_none")] + pub agent_overhead_usd: Option, + #[serde(rename = "total_tasks", skip_serializing_if = "Option::is_none")] + pub total_tasks: Option, + #[serde(rename = "completed_tasks", skip_serializing_if = "Option::is_none")] + pub completed_tasks: Option, + #[serde(rename = "failed_tasks", skip_serializing_if = "Option::is_none")] + pub failed_tasks: Option, + #[serde( + rename = "created_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub created_at: Option>, + #[serde( + rename = "updated_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub updated_at: Option>, + #[serde( + rename = "completed_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub completed_at: Option>, + #[serde( + rename = "result_summary", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub result_summary: Option>, +} + +impl EpicOut { + pub fn new(id: String, title: String) -> EpicOut { + EpicOut { + id, + title, + description: None, + tags: None, + created_by_node_id: None, + workflow_id: None, + user_profile_id: None, + status: None, + priority: None, + budget_tokens: None, + budget_usd: None, + spent_tokens: None, + spent_usd: None, + agent_overhead_tokens: None, + agent_overhead_usd: None, + total_tasks: None, + completed_tasks: None, + failed_tasks: None, + created_at: None, + updated_at: None, + completed_at: None, + result_summary: None, + } + } +} diff --git a/pipelit-client/src/models/epic_update.rs b/pipelit-client/src/models/epic_update.rs new file mode 100644 index 0000000..6c2314a --- /dev/null +++ b/pipelit-client/src/models/epic_update.rs @@ -0,0 +1,109 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EpicUpdate { + #[serde( + rename = "title", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub title: Option>, + #[serde( + rename = "description", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub description: Option>, + #[serde( + rename = "tags", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub tags: Option>>, + #[serde( + rename = "status", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub status: Option>, + #[serde( + rename = "priority", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub priority: Option>, + #[serde( + rename = "budget_tokens", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub budget_tokens: Option>, + #[serde( + rename = "budget_usd", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub budget_usd: Option>, + #[serde( + rename = "result_summary", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub result_summary: Option>, +} + +impl EpicUpdate { + pub fn new() -> EpicUpdate { + EpicUpdate { + title: None, + description: None, + tags: None, + status: None, + priority: None, + budget_tokens: None, + budget_usd: None, + result_summary: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "planning")] + Planning, + #[serde(rename = "active")] + Active, + #[serde(rename = "paused")] + Paused, + #[serde(rename = "completed")] + Completed, + #[serde(rename = "failed")] + Failed, + #[serde(rename = "cancelled")] + Cancelled, +} + +impl Default for Status { + fn default() -> Status { + Self::Planning + } +} diff --git a/pipelit-client/src/models/execution_detail_out.rs b/pipelit-client/src/models/execution_detail_out.rs new file mode 100644 index 0000000..8ee8b32 --- /dev/null +++ b/pipelit-client/src/models/execution_detail_out.rs @@ -0,0 +1,69 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ExecutionDetailOut { + #[serde(rename = "execution_id")] + pub execution_id: String, + #[serde(rename = "workflow_slug")] + pub workflow_slug: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "error_message", skip_serializing_if = "Option::is_none")] + pub error_message: Option, + #[serde( + rename = "started_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub started_at: Option>, + #[serde( + rename = "completed_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub completed_at: Option>, + #[serde(rename = "total_tokens", skip_serializing_if = "Option::is_none")] + pub total_tokens: Option, + #[serde(rename = "total_cost_usd", skip_serializing_if = "Option::is_none")] + pub total_cost_usd: Option, + #[serde(rename = "llm_calls", skip_serializing_if = "Option::is_none")] + pub llm_calls: Option, + #[serde(rename = "final_output", skip_serializing_if = "Option::is_none")] + pub final_output: Option, + #[serde(rename = "trigger_payload", skip_serializing_if = "Option::is_none")] + pub trigger_payload: Option, + #[serde(rename = "logs", skip_serializing_if = "Option::is_none")] + pub logs: Option>, +} + +impl ExecutionDetailOut { + pub fn new(execution_id: String, workflow_slug: String, status: String) -> ExecutionDetailOut { + ExecutionDetailOut { + execution_id, + workflow_slug, + status, + error_message: None, + started_at: None, + completed_at: None, + total_tokens: None, + total_cost_usd: None, + llm_calls: None, + final_output: None, + trigger_payload: None, + logs: None, + } + } +} diff --git a/pipelit-client/src/models/execution_log_out.rs b/pipelit-client/src/models/execution_log_out.rs new file mode 100644 index 0000000..b250a0d --- /dev/null +++ b/pipelit-client/src/models/execution_log_out.rs @@ -0,0 +1,63 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ExecutionLogOut { + #[serde(rename = "id")] + pub id: i32, + #[serde(rename = "node_id")] + pub node_id: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "input", skip_serializing_if = "Option::is_none")] + pub input: Option, + #[serde(rename = "output", skip_serializing_if = "Option::is_none")] + pub output: Option, + #[serde(rename = "error", skip_serializing_if = "Option::is_none")] + pub error: Option, + #[serde( + rename = "error_code", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub error_code: Option>, + #[serde( + rename = "metadata", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub metadata: Option>>, + #[serde(rename = "duration_ms", skip_serializing_if = "Option::is_none")] + pub duration_ms: Option, + #[serde(rename = "timestamp")] + pub timestamp: String, +} + +impl ExecutionLogOut { + pub fn new(id: i32, node_id: String, status: String, timestamp: String) -> ExecutionLogOut { + ExecutionLogOut { + id, + node_id, + status, + input: None, + output: None, + error: None, + error_code: None, + metadata: None, + duration_ms: None, + timestamp, + } + } +} diff --git a/pipelit-client/src/models/execution_out.rs b/pipelit-client/src/models/execution_out.rs new file mode 100644 index 0000000..c1512ea --- /dev/null +++ b/pipelit-client/src/models/execution_out.rs @@ -0,0 +1,60 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ExecutionOut { + #[serde(rename = "execution_id")] + pub execution_id: String, + #[serde(rename = "workflow_slug")] + pub workflow_slug: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "error_message", skip_serializing_if = "Option::is_none")] + pub error_message: Option, + #[serde( + rename = "started_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub started_at: Option>, + #[serde( + rename = "completed_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub completed_at: Option>, + #[serde(rename = "total_tokens", skip_serializing_if = "Option::is_none")] + pub total_tokens: Option, + #[serde(rename = "total_cost_usd", skip_serializing_if = "Option::is_none")] + pub total_cost_usd: Option, + #[serde(rename = "llm_calls", skip_serializing_if = "Option::is_none")] + pub llm_calls: Option, +} + +impl ExecutionOut { + pub fn new(execution_id: String, workflow_slug: String, status: String) -> ExecutionOut { + ExecutionOut { + execution_id, + workflow_slug, + status, + error_message: None, + started_at: None, + completed_at: None, + total_tokens: None, + total_cost_usd: None, + llm_calls: None, + } + } +} diff --git a/pipelit-client/src/models/gate_result.rs b/pipelit-client/src/models/gate_result.rs new file mode 100644 index 0000000..081016f --- /dev/null +++ b/pipelit-client/src/models/gate_result.rs @@ -0,0 +1,34 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GateResult { + #[serde(rename = "passed")] + pub passed: bool, + #[serde( + rename = "blocked_reason", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub blocked_reason: Option>, +} + +impl GateResult { + pub fn new(passed: bool) -> GateResult { + GateResult { + passed, + blocked_reason: None, + } + } +} diff --git a/pipelit-client/src/models/gateway_inbound_message.rs b/pipelit-client/src/models/gateway_inbound_message.rs new file mode 100644 index 0000000..033328e --- /dev/null +++ b/pipelit-client/src/models/gateway_inbound_message.rs @@ -0,0 +1,57 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// GatewayInboundMessage : Inbound message from gateway webhook. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GatewayInboundMessage { + #[serde(rename = "route")] + pub route: std::collections::HashMap, + #[serde(rename = "credential_id")] + pub credential_id: String, + #[serde(rename = "source")] + pub source: Box, + #[serde(rename = "text")] + pub text: String, + #[serde(rename = "attachments", skip_serializing_if = "Option::is_none")] + pub attachments: Option>, + #[serde(rename = "timestamp")] + pub timestamp: String, + #[serde( + rename = "extra_data", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub extra_data: Option>>, +} + +impl GatewayInboundMessage { + /// Inbound message from gateway webhook. + pub fn new( + route: std::collections::HashMap, + credential_id: String, + source: models::InboundSource, + text: String, + timestamp: String, + ) -> GatewayInboundMessage { + GatewayInboundMessage { + route, + credential_id, + source: Box::new(source), + text, + attachments: None, + timestamp, + extra_data: None, + } + } +} diff --git a/pipelit-client/src/models/http_validation_error.rs b/pipelit-client/src/models/http_validation_error.rs new file mode 100644 index 0000000..825de9a --- /dev/null +++ b/pipelit-client/src/models/http_validation_error.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct HttpValidationError { + #[serde(rename = "detail", skip_serializing_if = "Option::is_none")] + pub detail: Option>, +} + +impl HttpValidationError { + pub fn new() -> HttpValidationError { + HttpValidationError { detail: None } + } +} diff --git a/pipelit-client/src/models/inbound_attachment.rs b/pipelit-client/src/models/inbound_attachment.rs new file mode 100644 index 0000000..5729ae5 --- /dev/null +++ b/pipelit-client/src/models/inbound_attachment.rs @@ -0,0 +1,37 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// InboundAttachment : Attachment in inbound message. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct InboundAttachment { + #[serde(rename = "filename")] + pub filename: String, + #[serde(rename = "mime_type")] + pub mime_type: String, + #[serde(rename = "size_bytes", skip_serializing_if = "Option::is_none")] + pub size_bytes: Option, + #[serde(rename = "download_url", skip_serializing_if = "Option::is_none")] + pub download_url: Option, +} + +impl InboundAttachment { + /// Attachment in inbound message. + pub fn new(filename: String, mime_type: String) -> InboundAttachment { + InboundAttachment { + filename, + mime_type, + size_bytes: None, + download_url: None, + } + } +} diff --git a/pipelit-client/src/models/inbound_source.rs b/pipelit-client/src/models/inbound_source.rs new file mode 100644 index 0000000..ca5aac9 --- /dev/null +++ b/pipelit-client/src/models/inbound_source.rs @@ -0,0 +1,50 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// InboundSource : Source information for inbound message. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct InboundSource { + #[serde(rename = "protocol")] + pub protocol: String, + #[serde(rename = "chat_id")] + pub chat_id: String, + #[serde(rename = "message_id", skip_serializing_if = "Option::is_none")] + pub message_id: Option, + #[serde( + rename = "reply_to_message_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub reply_to_message_id: Option>, + #[serde( + rename = "from", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub from: Option>>, +} + +impl InboundSource { + /// Source information for inbound message. + pub fn new(protocol: String, chat_id: String) -> InboundSource { + InboundSource { + protocol, + chat_id, + message_id: None, + reply_to_message_id: None, + from: None, + } + } +} diff --git a/pipelit-client/src/models/location_inner.rs b/pipelit-client/src/models/location_inner.rs new file mode 100644 index 0000000..8437e83 --- /dev/null +++ b/pipelit-client/src/models/location_inner.rs @@ -0,0 +1,21 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct LocationInner {} + +impl LocationInner { + pub fn new() -> LocationInner { + LocationInner {} + } +} diff --git a/pipelit-client/src/models/manual_execute_in.rs b/pipelit-client/src/models/manual_execute_in.rs new file mode 100644 index 0000000..8be0aab --- /dev/null +++ b/pipelit-client/src/models/manual_execute_in.rs @@ -0,0 +1,34 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ManualExecuteIn { + #[serde(rename = "text", skip_serializing_if = "Option::is_none")] + pub text: Option, + #[serde( + rename = "trigger_node_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub trigger_node_id: Option>, +} + +impl ManualExecuteIn { + pub fn new() -> ManualExecuteIn { + ManualExecuteIn { + text: None, + trigger_node_id: None, + } + } +} diff --git a/pipelit-client/src/models/me_response.rs b/pipelit-client/src/models/me_response.rs new file mode 100644 index 0000000..675ce4c --- /dev/null +++ b/pipelit-client/src/models/me_response.rs @@ -0,0 +1,29 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MeResponse { + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "mfa_enabled", skip_serializing_if = "Option::is_none")] + pub mfa_enabled: Option, +} + +impl MeResponse { + pub fn new(username: String) -> MeResponse { + MeResponse { + username, + mfa_enabled: None, + } + } +} diff --git a/pipelit-client/src/models/mfa_disable_request.rs b/pipelit-client/src/models/mfa_disable_request.rs new file mode 100644 index 0000000..cb0755c --- /dev/null +++ b/pipelit-client/src/models/mfa_disable_request.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MfaDisableRequest { + #[serde(rename = "code")] + pub code: String, +} + +impl MfaDisableRequest { + pub fn new(code: String) -> MfaDisableRequest { + MfaDisableRequest { code } + } +} diff --git a/pipelit-client/src/models/mfa_login_verify_request.rs b/pipelit-client/src/models/mfa_login_verify_request.rs new file mode 100644 index 0000000..f787d8e --- /dev/null +++ b/pipelit-client/src/models/mfa_login_verify_request.rs @@ -0,0 +1,26 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MfaLoginVerifyRequest { + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "code")] + pub code: String, +} + +impl MfaLoginVerifyRequest { + pub fn new(username: String, code: String) -> MfaLoginVerifyRequest { + MfaLoginVerifyRequest { username, code } + } +} diff --git a/pipelit-client/src/models/mfa_setup_response.rs b/pipelit-client/src/models/mfa_setup_response.rs new file mode 100644 index 0000000..2028cca --- /dev/null +++ b/pipelit-client/src/models/mfa_setup_response.rs @@ -0,0 +1,29 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MfaSetupResponse { + #[serde(rename = "secret")] + pub secret: String, + #[serde(rename = "provisioning_uri")] + pub provisioning_uri: String, +} + +impl MfaSetupResponse { + pub fn new(secret: String, provisioning_uri: String) -> MfaSetupResponse { + MfaSetupResponse { + secret, + provisioning_uri, + } + } +} diff --git a/pipelit-client/src/models/mfa_status_response.rs b/pipelit-client/src/models/mfa_status_response.rs new file mode 100644 index 0000000..5ae6f05 --- /dev/null +++ b/pipelit-client/src/models/mfa_status_response.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MfaStatusResponse { + #[serde(rename = "mfa_enabled")] + pub mfa_enabled: bool, +} + +impl MfaStatusResponse { + pub fn new(mfa_enabled: bool) -> MfaStatusResponse { + MfaStatusResponse { mfa_enabled } + } +} diff --git a/pipelit-client/src/models/mfa_verify_request.rs b/pipelit-client/src/models/mfa_verify_request.rs new file mode 100644 index 0000000..8317202 --- /dev/null +++ b/pipelit-client/src/models/mfa_verify_request.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MfaVerifyRequest { + #[serde(rename = "code")] + pub code: String, +} + +impl MfaVerifyRequest { + pub fn new(code: String) -> MfaVerifyRequest { + MfaVerifyRequest { code } + } +} diff --git a/pipelit-client/src/models/mod.rs b/pipelit-client/src/models/mod.rs new file mode 100644 index 0000000..b8d6dbb --- /dev/null +++ b/pipelit-client/src/models/mod.rs @@ -0,0 +1,166 @@ +pub mod api_key_create_in; +pub use self::api_key_create_in::ApiKeyCreateIn; +pub mod api_key_created_out; +pub use self::api_key_created_out::ApiKeyCreatedOut; +pub mod api_key_out; +pub use self::api_key_out::ApiKeyOut; +pub mod batch_delete_checkpoints_in; +pub use self::batch_delete_checkpoints_in::BatchDeleteCheckpointsIn; +pub mod batch_delete_credentials_in; +pub use self::batch_delete_credentials_in::BatchDeleteCredentialsIn; +pub mod batch_delete_epics_in; +pub use self::batch_delete_epics_in::BatchDeleteEpicsIn; +pub mod batch_delete_episodes_in; +pub use self::batch_delete_episodes_in::BatchDeleteEpisodesIn; +pub mod batch_delete_executions_in; +pub use self::batch_delete_executions_in::BatchDeleteExecutionsIn; +pub mod batch_delete_facts_in; +pub use self::batch_delete_facts_in::BatchDeleteFactsIn; +pub mod batch_delete_procedures_in; +pub use self::batch_delete_procedures_in::BatchDeleteProceduresIn; +pub mod batch_delete_schedules_in; +pub use self::batch_delete_schedules_in::BatchDeleteSchedulesIn; +pub mod batch_delete_tasks_in; +pub use self::batch_delete_tasks_in::BatchDeleteTasksIn; +pub mod batch_delete_users_in; +pub use self::batch_delete_users_in::BatchDeleteUsersIn; +pub mod batch_delete_workflows_in; +pub use self::batch_delete_workflows_in::BatchDeleteWorkflowsIn; +pub mod batch_delete_workspaces_in; +pub use self::batch_delete_workspaces_in::BatchDeleteWorkspacesIn; +pub mod capabilities_info; +pub use self::capabilities_info::CapabilitiesInfo; +pub mod chat_message_in; +pub use self::chat_message_in::ChatMessageIn; +pub mod chat_message_out; +pub use self::chat_message_out::ChatMessageOut; +pub mod component_config_data; +pub use self::component_config_data::ComponentConfigData; +pub mod credential_in; +pub use self::credential_in::CredentialIn; +pub mod credential_model_out; +pub use self::credential_model_out::CredentialModelOut; +pub mod credential_out; +pub use self::credential_out::CredentialOut; +pub mod credential_test_out; +pub use self::credential_test_out::CredentialTestOut; +pub mod credential_update; +pub use self::credential_update::CredentialUpdate; +pub mod detail; +pub use self::detail::Detail; +pub mod edge_in; +pub use self::edge_in::EdgeIn; +pub mod edge_out; +pub use self::edge_out::EdgeOut; +pub mod edge_update; +pub use self::edge_update::EdgeUpdate; +pub mod environment_info; +pub use self::environment_info::EnvironmentInfo; +pub mod epic_create; +pub use self::epic_create::EpicCreate; +pub mod epic_out; +pub use self::epic_out::EpicOut; +pub mod epic_update; +pub use self::epic_update::EpicUpdate; +pub mod execution_detail_out; +pub use self::execution_detail_out::ExecutionDetailOut; +pub mod execution_log_out; +pub use self::execution_log_out::ExecutionLogOut; +pub mod execution_out; +pub use self::execution_out::ExecutionOut; +pub mod gate_result; +pub use self::gate_result::GateResult; +pub mod gateway_inbound_message; +pub use self::gateway_inbound_message::GatewayInboundMessage; +pub mod http_validation_error; +pub use self::http_validation_error::HttpValidationError; +pub mod inbound_attachment; +pub use self::inbound_attachment::InboundAttachment; +pub mod inbound_source; +pub use self::inbound_source::InboundSource; +pub mod location_inner; +pub use self::location_inner::LocationInner; +pub mod manual_execute_in; +pub use self::manual_execute_in::ManualExecuteIn; +pub mod me_response; +pub use self::me_response::MeResponse; +pub mod mfa_disable_request; +pub use self::mfa_disable_request::MfaDisableRequest; +pub mod mfa_login_verify_request; +pub use self::mfa_login_verify_request::MfaLoginVerifyRequest; +pub mod mfa_setup_response; +pub use self::mfa_setup_response::MfaSetupResponse; +pub mod mfa_status_response; +pub use self::mfa_status_response::MfaStatusResponse; +pub mod mfa_verify_request; +pub use self::mfa_verify_request::MfaVerifyRequest; +pub mod network_info; +pub use self::network_info::NetworkInfo; +pub mod node_in; +pub use self::node_in::NodeIn; +pub mod node_out; +pub use self::node_out::NodeOut; +pub mod node_update; +pub use self::node_update::NodeUpdate; +pub mod platform_config_out; +pub use self::platform_config_out::PlatformConfigOut; +pub mod runtime_info; +pub use self::runtime_info::RuntimeInfo; +pub mod schedule_job_info; +pub use self::schedule_job_info::ScheduleJobInfo; +pub mod scheduled_job_create; +pub use self::scheduled_job_create::ScheduledJobCreate; +pub mod scheduled_job_out; +pub use self::scheduled_job_out::ScheduledJobOut; +pub mod scheduled_job_update; +pub use self::scheduled_job_update::ScheduledJobUpdate; +pub mod self_update_in; +pub use self::self_update_in::SelfUpdateIn; +pub mod settings_response; +pub use self::settings_response::SettingsResponse; +pub mod settings_update; +pub use self::settings_update::SettingsUpdate; +pub mod settings_update_response; +pub use self::settings_update_response::SettingsUpdateResponse; +pub mod shell_tool_info; +pub use self::shell_tool_info::ShellToolInfo; +pub mod task_create; +pub use self::task_create::TaskCreate; +pub mod task_out; +pub use self::task_out::TaskOut; +pub mod task_update; +pub use self::task_update::TaskUpdate; +pub mod token_request; +pub use self::token_request::TokenRequest; +pub mod token_response; +pub use self::token_response::TokenResponse; +pub mod user_create_in; +pub use self::user_create_in::UserCreateIn; +pub mod user_info; +pub use self::user_info::UserInfo; +pub mod user_list_out; +pub use self::user_list_out::UserListOut; +pub mod user_out; +pub use self::user_out::UserOut; +pub mod user_update_in; +pub use self::user_update_in::UserUpdateIn; +pub mod validate_dsl_in; +pub use self::validate_dsl_in::ValidateDslIn; +pub mod validation_error; +pub use self::validation_error::ValidationError; +pub mod workflow_detail_out; +pub use self::workflow_detail_out::WorkflowDetailOut; +pub mod workflow_in; +pub use self::workflow_in::WorkflowIn; +pub mod workflow_out; +pub use self::workflow_out::WorkflowOut; +pub mod workflow_update; +pub use self::workflow_update::WorkflowUpdate; +pub mod workspace_env_var; +pub use self::workspace_env_var::WorkspaceEnvVar; +pub mod workspace_in; +pub use self::workspace_in::WorkspaceIn; +pub mod workspace_out; +pub use self::workspace_out::WorkspaceOut; +pub mod workspace_update; +pub use self::workspace_update::WorkspaceUpdate; diff --git a/pipelit-client/src/models/network_info.rs b/pipelit-client/src/models/network_info.rs new file mode 100644 index 0000000..8bb2123 --- /dev/null +++ b/pipelit-client/src/models/network_info.rs @@ -0,0 +1,26 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NetworkInfo { + #[serde(rename = "dns")] + pub dns: bool, + #[serde(rename = "http")] + pub http: bool, +} + +impl NetworkInfo { + pub fn new(dns: bool, http: bool) -> NetworkInfo { + NetworkInfo { dns, http } + } +} diff --git a/pipelit-client/src/models/node_in.rs b/pipelit-client/src/models/node_in.rs new file mode 100644 index 0000000..dfb4c76 --- /dev/null +++ b/pipelit-client/src/models/node_in.rs @@ -0,0 +1,162 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodeIn { + #[serde( + rename = "node_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub node_id: Option>, + #[serde( + rename = "label", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub label: Option>, + #[serde(rename = "component_type")] + pub component_type: ComponentType, + #[serde(rename = "is_entry_point", skip_serializing_if = "Option::is_none")] + pub is_entry_point: Option, + #[serde(rename = "interrupt_before", skip_serializing_if = "Option::is_none")] + pub interrupt_before: Option, + #[serde(rename = "interrupt_after", skip_serializing_if = "Option::is_none")] + pub interrupt_after: Option, + #[serde(rename = "position_x", skip_serializing_if = "Option::is_none")] + pub position_x: Option, + #[serde(rename = "position_y", skip_serializing_if = "Option::is_none")] + pub position_y: Option, + #[serde(rename = "config", skip_serializing_if = "Option::is_none")] + pub config: Option>, + #[serde( + rename = "subworkflow_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub subworkflow_id: Option>, + #[serde( + rename = "code_block_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub code_block_id: Option>, +} + +impl NodeIn { + pub fn new(component_type: ComponentType) -> NodeIn { + NodeIn { + node_id: None, + label: None, + component_type, + is_entry_point: None, + interrupt_before: None, + interrupt_after: None, + position_x: None, + position_y: None, + config: None, + subworkflow_id: None, + code_block_id: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ComponentType { + #[serde(rename = "categorizer")] + Categorizer, + #[serde(rename = "router")] + Router, + #[serde(rename = "extractor")] + Extractor, + #[serde(rename = "ai_model")] + AiModel, + #[serde(rename = "agent")] + Agent, + #[serde(rename = "deep_agent")] + DeepAgent, + #[serde(rename = "switch")] + Switch, + #[serde(rename = "run_command")] + RunCommand, + #[serde(rename = "get_totp_code")] + GetTotpCode, + #[serde(rename = "platform_api")] + PlatformApi, + #[serde(rename = "whoami")] + Whoami, + #[serde(rename = "epic_tools")] + EpicTools, + #[serde(rename = "task_tools")] + TaskTools, + #[serde(rename = "spawn_and_await")] + SpawnAndAwait, + #[serde(rename = "workflow_create")] + WorkflowCreate, + #[serde(rename = "workflow_discover")] + WorkflowDiscover, + #[serde(rename = "scheduler_tools")] + SchedulerTools, + #[serde(rename = "system_health")] + SystemHealth, + #[serde(rename = "human_confirmation")] + HumanConfirmation, + #[serde(rename = "workflow")] + Workflow, + #[serde(rename = "code")] + Code, + #[serde(rename = "code_execute")] + CodeExecute, + #[serde(rename = "loop")] + Loop, + #[serde(rename = "wait")] + Wait, + #[serde(rename = "merge")] + Merge, + #[serde(rename = "filter")] + Filter, + #[serde(rename = "error_handler")] + ErrorHandler, + #[serde(rename = "output_parser")] + OutputParser, + #[serde(rename = "memory_read")] + MemoryRead, + #[serde(rename = "memory_write")] + MemoryWrite, + #[serde(rename = "identify_user")] + IdentifyUser, + #[serde(rename = "trigger_telegram")] + TriggerTelegram, + #[serde(rename = "trigger_schedule")] + TriggerSchedule, + #[serde(rename = "trigger_manual")] + TriggerManual, + #[serde(rename = "trigger_workflow")] + TriggerWorkflow, + #[serde(rename = "trigger_error")] + TriggerError, + #[serde(rename = "trigger_chat")] + TriggerChat, + #[serde(rename = "skill")] + Skill, +} + +impl Default for ComponentType { + fn default() -> ComponentType { + Self::Categorizer + } +} diff --git a/pipelit-client/src/models/node_out.rs b/pipelit-client/src/models/node_out.rs new file mode 100644 index 0000000..4044094 --- /dev/null +++ b/pipelit-client/src/models/node_out.rs @@ -0,0 +1,182 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodeOut { + #[serde(rename = "id")] + pub id: i32, + #[serde(rename = "node_id")] + pub node_id: String, + #[serde( + rename = "label", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub label: Option>, + #[serde(rename = "component_type")] + pub component_type: ComponentType, + #[serde(rename = "is_entry_point")] + pub is_entry_point: bool, + #[serde(rename = "interrupt_before")] + pub interrupt_before: bool, + #[serde(rename = "interrupt_after")] + pub interrupt_after: bool, + #[serde(rename = "position_x")] + pub position_x: i32, + #[serde(rename = "position_y")] + pub position_y: i32, + #[serde(rename = "config")] + pub config: Box, + #[serde( + rename = "subworkflow_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub subworkflow_id: Option>, + #[serde( + rename = "code_block_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub code_block_id: Option>, + #[serde(rename = "updated_at")] + pub updated_at: String, + #[serde( + rename = "schedule_job", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub schedule_job: Option>>, +} + +impl NodeOut { + pub fn new( + id: i32, + node_id: String, + component_type: ComponentType, + is_entry_point: bool, + interrupt_before: bool, + interrupt_after: bool, + position_x: i32, + position_y: i32, + config: models::ComponentConfigData, + updated_at: String, + ) -> NodeOut { + NodeOut { + id, + node_id, + label: None, + component_type, + is_entry_point, + interrupt_before, + interrupt_after, + position_x, + position_y, + config: Box::new(config), + subworkflow_id: None, + code_block_id: None, + updated_at, + schedule_job: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ComponentType { + #[serde(rename = "categorizer")] + Categorizer, + #[serde(rename = "router")] + Router, + #[serde(rename = "extractor")] + Extractor, + #[serde(rename = "ai_model")] + AiModel, + #[serde(rename = "agent")] + Agent, + #[serde(rename = "deep_agent")] + DeepAgent, + #[serde(rename = "switch")] + Switch, + #[serde(rename = "run_command")] + RunCommand, + #[serde(rename = "get_totp_code")] + GetTotpCode, + #[serde(rename = "platform_api")] + PlatformApi, + #[serde(rename = "whoami")] + Whoami, + #[serde(rename = "epic_tools")] + EpicTools, + #[serde(rename = "task_tools")] + TaskTools, + #[serde(rename = "spawn_and_await")] + SpawnAndAwait, + #[serde(rename = "workflow_create")] + WorkflowCreate, + #[serde(rename = "workflow_discover")] + WorkflowDiscover, + #[serde(rename = "scheduler_tools")] + SchedulerTools, + #[serde(rename = "system_health")] + SystemHealth, + #[serde(rename = "human_confirmation")] + HumanConfirmation, + #[serde(rename = "workflow")] + Workflow, + #[serde(rename = "code")] + Code, + #[serde(rename = "code_execute")] + CodeExecute, + #[serde(rename = "loop")] + Loop, + #[serde(rename = "wait")] + Wait, + #[serde(rename = "merge")] + Merge, + #[serde(rename = "filter")] + Filter, + #[serde(rename = "error_handler")] + ErrorHandler, + #[serde(rename = "output_parser")] + OutputParser, + #[serde(rename = "memory_read")] + MemoryRead, + #[serde(rename = "memory_write")] + MemoryWrite, + #[serde(rename = "identify_user")] + IdentifyUser, + #[serde(rename = "trigger_telegram")] + TriggerTelegram, + #[serde(rename = "trigger_schedule")] + TriggerSchedule, + #[serde(rename = "trigger_manual")] + TriggerManual, + #[serde(rename = "trigger_workflow")] + TriggerWorkflow, + #[serde(rename = "trigger_error")] + TriggerError, + #[serde(rename = "trigger_chat")] + TriggerChat, + #[serde(rename = "skill")] + Skill, +} + +impl Default for ComponentType { + fn default() -> ComponentType { + Self::Categorizer + } +} diff --git a/pipelit-client/src/models/node_update.rs b/pipelit-client/src/models/node_update.rs new file mode 100644 index 0000000..8c49fdc --- /dev/null +++ b/pipelit-client/src/models/node_update.rs @@ -0,0 +1,197 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodeUpdate { + #[serde( + rename = "node_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub node_id: Option>, + #[serde( + rename = "label", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub label: Option>, + #[serde( + rename = "component_type", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub component_type: Option>, + #[serde( + rename = "is_entry_point", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub is_entry_point: Option>, + #[serde( + rename = "interrupt_before", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub interrupt_before: Option>, + #[serde( + rename = "interrupt_after", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub interrupt_after: Option>, + #[serde( + rename = "position_x", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub position_x: Option>, + #[serde( + rename = "position_y", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub position_y: Option>, + #[serde( + rename = "config", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub config: Option>>, + #[serde( + rename = "subworkflow_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub subworkflow_id: Option>, + #[serde( + rename = "code_block_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub code_block_id: Option>, +} + +impl NodeUpdate { + pub fn new() -> NodeUpdate { + NodeUpdate { + node_id: None, + label: None, + component_type: None, + is_entry_point: None, + interrupt_before: None, + interrupt_after: None, + position_x: None, + position_y: None, + config: None, + subworkflow_id: None, + code_block_id: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ComponentType { + #[serde(rename = "categorizer")] + Categorizer, + #[serde(rename = "router")] + Router, + #[serde(rename = "extractor")] + Extractor, + #[serde(rename = "ai_model")] + AiModel, + #[serde(rename = "agent")] + Agent, + #[serde(rename = "deep_agent")] + DeepAgent, + #[serde(rename = "switch")] + Switch, + #[serde(rename = "run_command")] + RunCommand, + #[serde(rename = "get_totp_code")] + GetTotpCode, + #[serde(rename = "platform_api")] + PlatformApi, + #[serde(rename = "whoami")] + Whoami, + #[serde(rename = "epic_tools")] + EpicTools, + #[serde(rename = "task_tools")] + TaskTools, + #[serde(rename = "spawn_and_await")] + SpawnAndAwait, + #[serde(rename = "workflow_create")] + WorkflowCreate, + #[serde(rename = "workflow_discover")] + WorkflowDiscover, + #[serde(rename = "scheduler_tools")] + SchedulerTools, + #[serde(rename = "system_health")] + SystemHealth, + #[serde(rename = "human_confirmation")] + HumanConfirmation, + #[serde(rename = "workflow")] + Workflow, + #[serde(rename = "code")] + Code, + #[serde(rename = "code_execute")] + CodeExecute, + #[serde(rename = "loop")] + Loop, + #[serde(rename = "wait")] + Wait, + #[serde(rename = "merge")] + Merge, + #[serde(rename = "filter")] + Filter, + #[serde(rename = "error_handler")] + ErrorHandler, + #[serde(rename = "output_parser")] + OutputParser, + #[serde(rename = "memory_read")] + MemoryRead, + #[serde(rename = "memory_write")] + MemoryWrite, + #[serde(rename = "identify_user")] + IdentifyUser, + #[serde(rename = "trigger_telegram")] + TriggerTelegram, + #[serde(rename = "trigger_schedule")] + TriggerSchedule, + #[serde(rename = "trigger_manual")] + TriggerManual, + #[serde(rename = "trigger_workflow")] + TriggerWorkflow, + #[serde(rename = "trigger_error")] + TriggerError, + #[serde(rename = "trigger_chat")] + TriggerChat, + #[serde(rename = "skill")] + Skill, +} + +impl Default for ComponentType { + fn default() -> ComponentType { + Self::Categorizer + } +} diff --git a/pipelit-client/src/models/platform_config_out.rs b/pipelit-client/src/models/platform_config_out.rs new file mode 100644 index 0000000..f931cab --- /dev/null +++ b/pipelit-client/src/models/platform_config_out.rs @@ -0,0 +1,70 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// PlatformConfigOut : Safe-to-expose conf.json values. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PlatformConfigOut { + #[serde(rename = "pipelit_dir")] + pub pipelit_dir: String, + #[serde(rename = "sandbox_mode")] + pub sandbox_mode: String, + #[serde(rename = "database_url")] + pub database_url: String, + #[serde(rename = "redis_url")] + pub redis_url: String, + #[serde(rename = "log_level")] + pub log_level: String, + #[serde(rename = "log_file")] + pub log_file: String, + #[serde(rename = "platform_base_url")] + pub platform_base_url: String, + #[serde( + rename = "cors_allow_all_origins", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub cors_allow_all_origins: Option>, + #[serde( + rename = "zombie_execution_threshold_seconds", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub zombie_execution_threshold_seconds: Option>, +} + +impl PlatformConfigOut { + /// Safe-to-expose conf.json values. + pub fn new( + pipelit_dir: String, + sandbox_mode: String, + database_url: String, + redis_url: String, + log_level: String, + log_file: String, + platform_base_url: String, + ) -> PlatformConfigOut { + PlatformConfigOut { + pipelit_dir, + sandbox_mode, + database_url, + redis_url, + log_level, + log_file, + platform_base_url, + cors_allow_all_origins: None, + zombie_execution_threshold_seconds: None, + } + } +} diff --git a/pipelit-client/src/models/runtime_info.rs b/pipelit-client/src/models/runtime_info.rs new file mode 100644 index 0000000..974aaea --- /dev/null +++ b/pipelit-client/src/models/runtime_info.rs @@ -0,0 +1,42 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RuntimeInfo { + #[serde(rename = "available")] + pub available: bool, + #[serde( + rename = "version", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub version: Option>, + #[serde( + rename = "path", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub path: Option>, +} + +impl RuntimeInfo { + pub fn new(available: bool) -> RuntimeInfo { + RuntimeInfo { + available, + version: None, + path: None, + } + } +} diff --git a/pipelit-client/src/models/schedule_job_info.rs b/pipelit-client/src/models/schedule_job_info.rs new file mode 100644 index 0000000..5bd64a9 --- /dev/null +++ b/pipelit-client/src/models/schedule_job_info.rs @@ -0,0 +1,83 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScheduleJobInfo { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "run_count")] + pub run_count: i32, + #[serde(rename = "error_count")] + pub error_count: i32, + #[serde(rename = "current_repeat")] + pub current_repeat: i32, + #[serde(rename = "current_retry")] + pub current_retry: i32, + #[serde(rename = "total_repeats")] + pub total_repeats: i32, + #[serde(rename = "max_retries")] + pub max_retries: i32, + #[serde(rename = "timeout_seconds")] + pub timeout_seconds: i32, + #[serde(rename = "interval_seconds")] + pub interval_seconds: i32, + #[serde(rename = "last_run_at", deserialize_with = "Option::deserialize")] + pub last_run_at: Option, + #[serde(rename = "next_run_at", deserialize_with = "Option::deserialize")] + pub next_run_at: Option, + #[serde(rename = "last_error", skip_serializing_if = "Option::is_none")] + pub last_error: Option, + #[serde( + rename = "created_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub created_at: Option>, +} + +impl ScheduleJobInfo { + pub fn new( + id: String, + status: String, + run_count: i32, + error_count: i32, + current_repeat: i32, + current_retry: i32, + total_repeats: i32, + max_retries: i32, + timeout_seconds: i32, + interval_seconds: i32, + last_run_at: Option, + next_run_at: Option, + ) -> ScheduleJobInfo { + ScheduleJobInfo { + id, + status, + run_count, + error_count, + current_repeat, + current_retry, + total_repeats, + max_retries, + timeout_seconds, + interval_seconds, + last_run_at, + next_run_at, + last_error: None, + created_at: None, + } + } +} diff --git a/pipelit-client/src/models/scheduled_job_create.rs b/pipelit-client/src/models/scheduled_job_create.rs new file mode 100644 index 0000000..b2791ea --- /dev/null +++ b/pipelit-client/src/models/scheduled_job_create.rs @@ -0,0 +1,60 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScheduledJobCreate { + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "workflow_id")] + pub workflow_id: i32, + #[serde( + rename = "trigger_node_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub trigger_node_id: Option>, + #[serde(rename = "interval_seconds")] + pub interval_seconds: i32, + #[serde(rename = "total_repeats", skip_serializing_if = "Option::is_none")] + pub total_repeats: Option, + #[serde(rename = "max_retries", skip_serializing_if = "Option::is_none")] + pub max_retries: Option, + #[serde(rename = "timeout_seconds", skip_serializing_if = "Option::is_none")] + pub timeout_seconds: Option, + #[serde( + rename = "trigger_payload", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub trigger_payload: Option>>, +} + +impl ScheduledJobCreate { + pub fn new(name: String, workflow_id: i32, interval_seconds: i32) -> ScheduledJobCreate { + ScheduledJobCreate { + name, + description: None, + workflow_id, + trigger_node_id: None, + interval_seconds, + total_repeats: None, + max_retries: None, + timeout_seconds: None, + trigger_payload: None, + } + } +} diff --git a/pipelit-client/src/models/scheduled_job_out.rs b/pipelit-client/src/models/scheduled_job_out.rs new file mode 100644 index 0000000..bcbd774 --- /dev/null +++ b/pipelit-client/src/models/scheduled_job_out.rs @@ -0,0 +1,122 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScheduledJobOut { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "workflow_id")] + pub workflow_id: i32, + #[serde( + rename = "trigger_node_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub trigger_node_id: Option>, + #[serde(rename = "user_profile_id")] + pub user_profile_id: i32, + #[serde(rename = "interval_seconds")] + pub interval_seconds: i32, + #[serde(rename = "total_repeats", skip_serializing_if = "Option::is_none")] + pub total_repeats: Option, + #[serde(rename = "max_retries", skip_serializing_if = "Option::is_none")] + pub max_retries: Option, + #[serde(rename = "timeout_seconds", skip_serializing_if = "Option::is_none")] + pub timeout_seconds: Option, + #[serde( + rename = "trigger_payload", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub trigger_payload: Option>>, + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, + #[serde(rename = "current_repeat", skip_serializing_if = "Option::is_none")] + pub current_repeat: Option, + #[serde(rename = "current_retry", skip_serializing_if = "Option::is_none")] + pub current_retry: Option, + #[serde( + rename = "last_run_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub last_run_at: Option>, + #[serde( + rename = "next_run_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub next_run_at: Option>, + #[serde(rename = "run_count", skip_serializing_if = "Option::is_none")] + pub run_count: Option, + #[serde(rename = "error_count", skip_serializing_if = "Option::is_none")] + pub error_count: Option, + #[serde(rename = "last_error", skip_serializing_if = "Option::is_none")] + pub last_error: Option, + #[serde( + rename = "created_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub created_at: Option>, + #[serde( + rename = "updated_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub updated_at: Option>, +} + +impl ScheduledJobOut { + pub fn new( + id: String, + name: String, + workflow_id: i32, + user_profile_id: i32, + interval_seconds: i32, + ) -> ScheduledJobOut { + ScheduledJobOut { + id, + name, + description: None, + workflow_id, + trigger_node_id: None, + user_profile_id, + interval_seconds, + total_repeats: None, + max_retries: None, + timeout_seconds: None, + trigger_payload: None, + status: None, + current_repeat: None, + current_retry: None, + last_run_at: None, + next_run_at: None, + run_count: None, + error_count: None, + last_error: None, + created_at: None, + updated_at: None, + } + } +} diff --git a/pipelit-client/src/models/scheduled_job_update.rs b/pipelit-client/src/models/scheduled_job_update.rs new file mode 100644 index 0000000..a54dbc5 --- /dev/null +++ b/pipelit-client/src/models/scheduled_job_update.rs @@ -0,0 +1,79 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScheduledJobUpdate { + #[serde( + rename = "name", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub name: Option>, + #[serde( + rename = "description", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub description: Option>, + #[serde( + rename = "interval_seconds", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub interval_seconds: Option>, + #[serde( + rename = "total_repeats", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub total_repeats: Option>, + #[serde( + rename = "max_retries", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub max_retries: Option>, + #[serde( + rename = "timeout_seconds", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub timeout_seconds: Option>, + #[serde( + rename = "trigger_payload", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub trigger_payload: Option>>, +} + +impl ScheduledJobUpdate { + pub fn new() -> ScheduledJobUpdate { + ScheduledJobUpdate { + name: None, + description: None, + interval_seconds: None, + total_repeats: None, + max_retries: None, + timeout_seconds: None, + trigger_payload: None, + } + } +} diff --git a/pipelit-client/src/models/self_update_in.rs b/pipelit-client/src/models/self_update_in.rs new file mode 100644 index 0000000..438e4a9 --- /dev/null +++ b/pipelit-client/src/models/self_update_in.rs @@ -0,0 +1,47 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SelfUpdateIn { + #[serde( + rename = "password", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub password: Option>, + #[serde( + rename = "first_name", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub first_name: Option>, + #[serde( + rename = "last_name", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub last_name: Option>, +} + +impl SelfUpdateIn { + pub fn new() -> SelfUpdateIn { + SelfUpdateIn { + password: None, + first_name: None, + last_name: None, + } + } +} diff --git a/pipelit-client/src/models/settings_response.rs b/pipelit-client/src/models/settings_response.rs new file mode 100644 index 0000000..08a0d61 --- /dev/null +++ b/pipelit-client/src/models/settings_response.rs @@ -0,0 +1,32 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SettingsResponse { + #[serde(rename = "config")] + pub config: Box, + #[serde(rename = "environment")] + pub environment: Box, +} + +impl SettingsResponse { + pub fn new( + config: models::PlatformConfigOut, + environment: models::EnvironmentInfo, + ) -> SettingsResponse { + SettingsResponse { + config: Box::new(config), + environment: Box::new(environment), + } + } +} diff --git a/pipelit-client/src/models/settings_update.rs b/pipelit-client/src/models/settings_update.rs new file mode 100644 index 0000000..5d46cb3 --- /dev/null +++ b/pipelit-client/src/models/settings_update.rs @@ -0,0 +1,109 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// SettingsUpdate : PATCH body — all fields optional. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SettingsUpdate { + #[serde( + rename = "sandbox_mode", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub sandbox_mode: Option>, + #[serde( + rename = "database_url", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub database_url: Option>, + #[serde( + rename = "redis_url", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub redis_url: Option>, + #[serde( + rename = "log_level", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub log_level: Option>, + #[serde( + rename = "log_file", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub log_file: Option>, + #[serde( + rename = "platform_base_url", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub platform_base_url: Option>, + #[serde( + rename = "cors_allow_all_origins", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub cors_allow_all_origins: Option>, + #[serde( + rename = "zombie_execution_threshold_seconds", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub zombie_execution_threshold_seconds: Option>, +} + +impl SettingsUpdate { + /// PATCH body — all fields optional. + pub fn new() -> SettingsUpdate { + SettingsUpdate { + sandbox_mode: None, + database_url: None, + redis_url: None, + log_level: None, + log_file: None, + platform_base_url: None, + cors_allow_all_origins: None, + zombie_execution_threshold_seconds: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogLevel { + #[serde(rename = "DEBUG")] + Debug, + #[serde(rename = "INFO")] + Info, + #[serde(rename = "WARNING")] + Warning, + #[serde(rename = "ERROR")] + Error, + #[serde(rename = "CRITICAL")] + Critical, +} + +impl Default for LogLevel { + fn default() -> LogLevel { + Self::Debug + } +} diff --git a/pipelit-client/src/models/settings_update_response.rs b/pipelit-client/src/models/settings_update_response.rs new file mode 100644 index 0000000..58e7143 --- /dev/null +++ b/pipelit-client/src/models/settings_update_response.rs @@ -0,0 +1,36 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SettingsUpdateResponse { + #[serde(rename = "config")] + pub config: Box, + #[serde(rename = "hot_reloaded")] + pub hot_reloaded: Vec, + #[serde(rename = "restart_required")] + pub restart_required: Vec, +} + +impl SettingsUpdateResponse { + pub fn new( + config: models::PlatformConfigOut, + hot_reloaded: Vec, + restart_required: Vec, + ) -> SettingsUpdateResponse { + SettingsUpdateResponse { + config: Box::new(config), + hot_reloaded, + restart_required, + } + } +} diff --git a/pipelit-client/src/models/shell_tool_info.rs b/pipelit-client/src/models/shell_tool_info.rs new file mode 100644 index 0000000..ba0d53f --- /dev/null +++ b/pipelit-client/src/models/shell_tool_info.rs @@ -0,0 +1,26 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ShellToolInfo { + #[serde(rename = "available")] + pub available: bool, + #[serde(rename = "tier")] + pub tier: i32, +} + +impl ShellToolInfo { + pub fn new(available: bool, tier: i32) -> ShellToolInfo { + ShellToolInfo { available, tier } + } +} diff --git a/pipelit-client/src/models/task_create.rs b/pipelit-client/src/models/task_create.rs new file mode 100644 index 0000000..84d69a5 --- /dev/null +++ b/pipelit-client/src/models/task_create.rs @@ -0,0 +1,73 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TaskCreate { + #[serde(rename = "epic_id")] + pub epic_id: String, + #[serde(rename = "title")] + pub title: String, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, + #[serde(rename = "depends_on", skip_serializing_if = "Option::is_none")] + pub depends_on: Option>, + #[serde( + rename = "priority", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub priority: Option>, + #[serde( + rename = "workflow_slug", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub workflow_slug: Option>, + #[serde( + rename = "estimated_tokens", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub estimated_tokens: Option>, + #[serde(rename = "max_retries", skip_serializing_if = "Option::is_none")] + pub max_retries: Option, + #[serde( + rename = "requirements", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub requirements: Option>>, +} + +impl TaskCreate { + pub fn new(epic_id: String, title: String) -> TaskCreate { + TaskCreate { + epic_id, + title, + description: None, + tags: None, + depends_on: None, + priority: None, + workflow_slug: None, + estimated_tokens: None, + max_retries: None, + requirements: None, + } + } +} diff --git a/pipelit-client/src/models/task_out.rs b/pipelit-client/src/models/task_out.rs new file mode 100644 index 0000000..ab96828 --- /dev/null +++ b/pipelit-client/src/models/task_out.rs @@ -0,0 +1,170 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TaskOut { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "epic_id")] + pub epic_id: String, + #[serde(rename = "title")] + pub title: String, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, + #[serde( + rename = "created_by_node_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub created_by_node_id: Option>, + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, + #[serde(rename = "priority", skip_serializing_if = "Option::is_none")] + pub priority: Option, + #[serde( + rename = "workflow_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub workflow_id: Option>, + #[serde( + rename = "workflow_slug", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub workflow_slug: Option>, + #[serde( + rename = "execution_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub execution_id: Option>, + #[serde(rename = "workflow_source", skip_serializing_if = "Option::is_none")] + pub workflow_source: Option, + #[serde(rename = "depends_on", skip_serializing_if = "Option::is_none")] + pub depends_on: Option>, + #[serde( + rename = "requirements", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub requirements: Option>>, + #[serde( + rename = "estimated_tokens", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub estimated_tokens: Option>, + #[serde(rename = "actual_tokens", skip_serializing_if = "Option::is_none")] + pub actual_tokens: Option, + #[serde(rename = "actual_usd", skip_serializing_if = "Option::is_none")] + pub actual_usd: Option, + #[serde(rename = "llm_calls", skip_serializing_if = "Option::is_none")] + pub llm_calls: Option, + #[serde(rename = "tool_invocations", skip_serializing_if = "Option::is_none")] + pub tool_invocations: Option, + #[serde(rename = "duration_ms", skip_serializing_if = "Option::is_none")] + pub duration_ms: Option, + #[serde( + rename = "created_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub created_at: Option>, + #[serde( + rename = "updated_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub updated_at: Option>, + #[serde( + rename = "started_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub started_at: Option>, + #[serde( + rename = "completed_at", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub completed_at: Option>, + #[serde( + rename = "result_summary", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub result_summary: Option>, + #[serde( + rename = "error_message", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub error_message: Option>, + #[serde(rename = "retry_count", skip_serializing_if = "Option::is_none")] + pub retry_count: Option, + #[serde(rename = "max_retries", skip_serializing_if = "Option::is_none")] + pub max_retries: Option, + #[serde(rename = "notes", skip_serializing_if = "Option::is_none")] + pub notes: Option>, +} + +impl TaskOut { + pub fn new(id: String, epic_id: String, title: String) -> TaskOut { + TaskOut { + id, + epic_id, + title, + description: None, + tags: None, + created_by_node_id: None, + status: None, + priority: None, + workflow_id: None, + workflow_slug: None, + execution_id: None, + workflow_source: None, + depends_on: None, + requirements: None, + estimated_tokens: None, + actual_tokens: None, + actual_usd: None, + llm_calls: None, + tool_invocations: None, + duration_ms: None, + created_at: None, + updated_at: None, + started_at: None, + completed_at: None, + result_summary: None, + error_message: None, + retry_count: None, + max_retries: None, + notes: None, + } + } +} diff --git a/pipelit-client/src/models/task_update.rs b/pipelit-client/src/models/task_update.rs new file mode 100644 index 0000000..9b20476 --- /dev/null +++ b/pipelit-client/src/models/task_update.rs @@ -0,0 +1,125 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TaskUpdate { + #[serde( + rename = "title", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub title: Option>, + #[serde( + rename = "description", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub description: Option>, + #[serde( + rename = "tags", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub tags: Option>>, + #[serde( + rename = "status", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub status: Option>, + #[serde( + rename = "priority", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub priority: Option>, + #[serde( + rename = "workflow_slug", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub workflow_slug: Option>, + #[serde( + rename = "execution_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub execution_id: Option>, + #[serde( + rename = "result_summary", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub result_summary: Option>, + #[serde( + rename = "error_message", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub error_message: Option>, + #[serde( + rename = "notes", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub notes: Option>>, +} + +impl TaskUpdate { + pub fn new() -> TaskUpdate { + TaskUpdate { + title: None, + description: None, + tags: None, + status: None, + priority: None, + workflow_slug: None, + execution_id: None, + result_summary: None, + error_message: None, + notes: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "pending")] + Pending, + #[serde(rename = "blocked")] + Blocked, + #[serde(rename = "running")] + Running, + #[serde(rename = "completed")] + Completed, + #[serde(rename = "failed")] + Failed, + #[serde(rename = "cancelled")] + Cancelled, +} + +impl Default for Status { + fn default() -> Status { + Self::Pending + } +} diff --git a/pipelit-client/src/models/token_request.rs b/pipelit-client/src/models/token_request.rs new file mode 100644 index 0000000..1d3a762 --- /dev/null +++ b/pipelit-client/src/models/token_request.rs @@ -0,0 +1,26 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TokenRequest { + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "password")] + pub password: String, +} + +impl TokenRequest { + pub fn new(username: String, password: String) -> TokenRequest { + TokenRequest { username, password } + } +} diff --git a/pipelit-client/src/models/token_response.rs b/pipelit-client/src/models/token_response.rs new file mode 100644 index 0000000..34681ee --- /dev/null +++ b/pipelit-client/src/models/token_response.rs @@ -0,0 +1,29 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TokenResponse { + #[serde(rename = "key")] + pub key: String, + #[serde(rename = "requires_mfa", skip_serializing_if = "Option::is_none")] + pub requires_mfa: Option, +} + +impl TokenResponse { + pub fn new(key: String) -> TokenResponse { + TokenResponse { + key, + requires_mfa: None, + } + } +} diff --git a/pipelit-client/src/models/user_create_in.rs b/pipelit-client/src/models/user_create_in.rs new file mode 100644 index 0000000..1fcacea --- /dev/null +++ b/pipelit-client/src/models/user_create_in.rs @@ -0,0 +1,62 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserCreateIn { + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "password")] + pub password: String, + #[serde(rename = "role", skip_serializing_if = "Option::is_none")] + pub role: Option, + #[serde( + rename = "first_name", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub first_name: Option>, + #[serde( + rename = "last_name", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub last_name: Option>, +} + +impl UserCreateIn { + pub fn new(username: String, password: String) -> UserCreateIn { + UserCreateIn { + username, + password, + role: None, + first_name: None, + last_name: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Role { + #[serde(rename = "admin")] + Admin, + #[serde(rename = "normal")] + Normal, +} + +impl Default for Role { + fn default() -> Role { + Self::Admin + } +} diff --git a/pipelit-client/src/models/user_info.rs b/pipelit-client/src/models/user_info.rs new file mode 100644 index 0000000..cfac200 --- /dev/null +++ b/pipelit-client/src/models/user_info.rs @@ -0,0 +1,44 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// UserInfo : User information from inbound message source. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserInfo { + #[serde(rename = "id")] + pub id: String, + #[serde( + rename = "username", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub username: Option>, + #[serde( + rename = "display_name", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub display_name: Option>, +} + +impl UserInfo { + /// User information from inbound message source. + pub fn new(id: String) -> UserInfo { + UserInfo { + id, + username: None, + display_name: None, + } + } +} diff --git a/pipelit-client/src/models/user_list_out.rs b/pipelit-client/src/models/user_list_out.rs new file mode 100644 index 0000000..7ef4c68 --- /dev/null +++ b/pipelit-client/src/models/user_list_out.rs @@ -0,0 +1,26 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserListOut { + #[serde(rename = "users")] + pub users: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl UserListOut { + pub fn new(users: Vec, total: i32) -> UserListOut { + UserListOut { users, total } + } +} diff --git a/pipelit-client/src/models/user_out.rs b/pipelit-client/src/models/user_out.rs new file mode 100644 index 0000000..c9aee6e --- /dev/null +++ b/pipelit-client/src/models/user_out.rs @@ -0,0 +1,69 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserOut { + #[serde(rename = "id")] + pub id: i32, + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "role")] + pub role: Role, + #[serde(rename = "first_name")] + pub first_name: String, + #[serde(rename = "last_name")] + pub last_name: String, + #[serde(rename = "created_at")] + pub created_at: String, + #[serde(rename = "mfa_enabled")] + pub mfa_enabled: bool, + #[serde(rename = "key_count", skip_serializing_if = "Option::is_none")] + pub key_count: Option, +} + +impl UserOut { + pub fn new( + id: i32, + username: String, + role: Role, + first_name: String, + last_name: String, + created_at: String, + mfa_enabled: bool, + ) -> UserOut { + UserOut { + id, + username, + role, + first_name, + last_name, + created_at, + mfa_enabled, + key_count: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Role { + #[serde(rename = "admin")] + Admin, + #[serde(rename = "normal")] + Normal, +} + +impl Default for Role { + fn default() -> Role { + Self::Admin + } +} diff --git a/pipelit-client/src/models/user_update_in.rs b/pipelit-client/src/models/user_update_in.rs new file mode 100644 index 0000000..167dbe8 --- /dev/null +++ b/pipelit-client/src/models/user_update_in.rs @@ -0,0 +1,69 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserUpdateIn { + #[serde( + rename = "role", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub role: Option>, + #[serde( + rename = "password", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub password: Option>, + #[serde( + rename = "first_name", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub first_name: Option>, + #[serde( + rename = "last_name", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub last_name: Option>, +} + +impl UserUpdateIn { + pub fn new() -> UserUpdateIn { + UserUpdateIn { + role: None, + password: None, + first_name: None, + last_name: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Role { + #[serde(rename = "admin")] + Admin, + #[serde(rename = "normal")] + Normal, +} + +impl Default for Role { + fn default() -> Role { + Self::Admin + } +} diff --git a/pipelit-client/src/models/validate_dsl_in.rs b/pipelit-client/src/models/validate_dsl_in.rs new file mode 100644 index 0000000..54c03bc --- /dev/null +++ b/pipelit-client/src/models/validate_dsl_in.rs @@ -0,0 +1,24 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ValidateDslIn { + #[serde(rename = "yaml_str")] + pub yaml_str: String, +} + +impl ValidateDslIn { + pub fn new(yaml_str: String) -> ValidateDslIn { + ValidateDslIn { yaml_str } + } +} diff --git a/pipelit-client/src/models/validation_error.rs b/pipelit-client/src/models/validation_error.rs new file mode 100644 index 0000000..78284bb --- /dev/null +++ b/pipelit-client/src/models/validation_error.rs @@ -0,0 +1,43 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ValidationError { + #[serde(rename = "loc")] + pub loc: Vec, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde( + rename = "input", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub input: Option>, + #[serde(rename = "ctx", skip_serializing_if = "Option::is_none")] + pub ctx: Option, +} + +impl ValidationError { + pub fn new(loc: Vec, msg: String, r#type: String) -> ValidationError { + ValidationError { + loc, + msg, + r#type, + input: None, + ctx: None, + } + } +} diff --git a/pipelit-client/src/models/workflow_detail_out.rs b/pipelit-client/src/models/workflow_detail_out.rs new file mode 100644 index 0000000..971aad8 --- /dev/null +++ b/pipelit-client/src/models/workflow_detail_out.rs @@ -0,0 +1,110 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct WorkflowDetailOut { + #[serde(rename = "id")] + pub id: i32, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "slug")] + pub slug: String, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "is_active")] + pub is_active: bool, + #[serde(rename = "is_public")] + pub is_public: bool, + #[serde(rename = "is_default")] + pub is_default: bool, + #[serde( + rename = "tags", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub tags: Option>>, + #[serde( + rename = "error_handler_workflow_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub error_handler_workflow_id: Option>, + #[serde( + rename = "max_execution_seconds", + skip_serializing_if = "Option::is_none" + )] + pub max_execution_seconds: Option, + #[serde( + rename = "input_schema", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub input_schema: Option>>, + #[serde( + rename = "output_schema", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub output_schema: Option>>, + #[serde(rename = "node_count", skip_serializing_if = "Option::is_none")] + pub node_count: Option, + #[serde(rename = "edge_count", skip_serializing_if = "Option::is_none")] + pub edge_count: Option, + #[serde(rename = "created_at")] + pub created_at: String, + #[serde(rename = "updated_at")] + pub updated_at: String, + #[serde(rename = "nodes", skip_serializing_if = "Option::is_none")] + pub nodes: Option>, + #[serde(rename = "edges", skip_serializing_if = "Option::is_none")] + pub edges: Option>, +} + +impl WorkflowDetailOut { + pub fn new( + id: i32, + name: String, + slug: String, + description: String, + is_active: bool, + is_public: bool, + is_default: bool, + created_at: String, + updated_at: String, + ) -> WorkflowDetailOut { + WorkflowDetailOut { + id, + name, + slug, + description, + is_active, + is_public, + is_default, + tags: None, + error_handler_workflow_id: None, + max_execution_seconds: None, + input_schema: None, + output_schema: None, + node_count: None, + edge_count: None, + created_at, + updated_at, + nodes: None, + edges: None, + } + } +} diff --git a/pipelit-client/src/models/workflow_in.rs b/pipelit-client/src/models/workflow_in.rs new file mode 100644 index 0000000..cff5daf --- /dev/null +++ b/pipelit-client/src/models/workflow_in.rs @@ -0,0 +1,79 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct WorkflowIn { + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "slug")] + pub slug: String, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "is_active", skip_serializing_if = "Option::is_none")] + pub is_active: Option, + #[serde(rename = "is_public", skip_serializing_if = "Option::is_none")] + pub is_public: Option, + #[serde(rename = "is_default", skip_serializing_if = "Option::is_none")] + pub is_default: Option, + #[serde( + rename = "tags", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub tags: Option>>, + #[serde( + rename = "error_handler_workflow_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub error_handler_workflow_id: Option>, + #[serde( + rename = "max_execution_seconds", + skip_serializing_if = "Option::is_none" + )] + pub max_execution_seconds: Option, + #[serde( + rename = "input_schema", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub input_schema: Option>>, + #[serde( + rename = "output_schema", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub output_schema: Option>>, +} + +impl WorkflowIn { + pub fn new(name: String, slug: String) -> WorkflowIn { + WorkflowIn { + name, + slug, + description: None, + is_active: None, + is_public: None, + is_default: None, + tags: None, + error_handler_workflow_id: None, + max_execution_seconds: None, + input_schema: None, + output_schema: None, + } + } +} diff --git a/pipelit-client/src/models/workflow_out.rs b/pipelit-client/src/models/workflow_out.rs new file mode 100644 index 0000000..d69748c --- /dev/null +++ b/pipelit-client/src/models/workflow_out.rs @@ -0,0 +1,104 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct WorkflowOut { + #[serde(rename = "id")] + pub id: i32, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "slug")] + pub slug: String, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "is_active")] + pub is_active: bool, + #[serde(rename = "is_public")] + pub is_public: bool, + #[serde(rename = "is_default")] + pub is_default: bool, + #[serde( + rename = "tags", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub tags: Option>>, + #[serde( + rename = "error_handler_workflow_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub error_handler_workflow_id: Option>, + #[serde( + rename = "max_execution_seconds", + skip_serializing_if = "Option::is_none" + )] + pub max_execution_seconds: Option, + #[serde( + rename = "input_schema", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub input_schema: Option>>, + #[serde( + rename = "output_schema", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub output_schema: Option>>, + #[serde(rename = "node_count", skip_serializing_if = "Option::is_none")] + pub node_count: Option, + #[serde(rename = "edge_count", skip_serializing_if = "Option::is_none")] + pub edge_count: Option, + #[serde(rename = "created_at")] + pub created_at: String, + #[serde(rename = "updated_at")] + pub updated_at: String, +} + +impl WorkflowOut { + pub fn new( + id: i32, + name: String, + slug: String, + description: String, + is_active: bool, + is_public: bool, + is_default: bool, + created_at: String, + updated_at: String, + ) -> WorkflowOut { + WorkflowOut { + id, + name, + slug, + description, + is_active, + is_public, + is_default, + tags: None, + error_handler_workflow_id: None, + max_execution_seconds: None, + input_schema: None, + output_schema: None, + node_count: None, + edge_count: None, + created_at, + updated_at, + } + } +} diff --git a/pipelit-client/src/models/workflow_update.rs b/pipelit-client/src/models/workflow_update.rs new file mode 100644 index 0000000..cbcb572 --- /dev/null +++ b/pipelit-client/src/models/workflow_update.rs @@ -0,0 +1,111 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct WorkflowUpdate { + #[serde( + rename = "name", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub name: Option>, + #[serde( + rename = "slug", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub slug: Option>, + #[serde( + rename = "description", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub description: Option>, + #[serde( + rename = "is_active", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub is_active: Option>, + #[serde( + rename = "is_public", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub is_public: Option>, + #[serde( + rename = "is_default", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub is_default: Option>, + #[serde( + rename = "tags", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub tags: Option>>, + #[serde( + rename = "error_handler_workflow_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub error_handler_workflow_id: Option>, + #[serde( + rename = "max_execution_seconds", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub max_execution_seconds: Option>, + #[serde( + rename = "input_schema", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub input_schema: Option>>, + #[serde( + rename = "output_schema", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub output_schema: Option>>, +} + +impl WorkflowUpdate { + pub fn new() -> WorkflowUpdate { + WorkflowUpdate { + name: None, + slug: None, + description: None, + is_active: None, + is_public: None, + is_default: None, + tags: None, + error_handler_workflow_id: None, + max_execution_seconds: None, + input_schema: None, + output_schema: None, + } + } +} diff --git a/pipelit-client/src/models/workspace_env_var.rs b/pipelit-client/src/models/workspace_env_var.rs new file mode 100644 index 0000000..a6e5651 --- /dev/null +++ b/pipelit-client/src/models/workspace_env_var.rs @@ -0,0 +1,67 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct WorkspaceEnvVar { + #[serde(rename = "key")] + pub key: String, + #[serde( + rename = "value", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub value: Option>, + #[serde( + rename = "credential_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub credential_id: Option>, + #[serde( + rename = "credential_field", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub credential_field: Option>, + #[serde(rename = "source", skip_serializing_if = "Option::is_none")] + pub source: Option, +} + +impl WorkspaceEnvVar { + pub fn new(key: String) -> WorkspaceEnvVar { + WorkspaceEnvVar { + key, + value: None, + credential_id: None, + credential_field: None, + source: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Source { + #[serde(rename = "raw")] + Raw, + #[serde(rename = "credential")] + Credential, +} + +impl Default for Source { + fn default() -> Source { + Self::Raw + } +} diff --git a/pipelit-client/src/models/workspace_in.rs b/pipelit-client/src/models/workspace_in.rs new file mode 100644 index 0000000..930f89f --- /dev/null +++ b/pipelit-client/src/models/workspace_in.rs @@ -0,0 +1,45 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct WorkspaceIn { + #[serde(rename = "name")] + pub name: String, + #[serde( + rename = "path", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub path: Option>, + #[serde(rename = "allow_network", skip_serializing_if = "Option::is_none")] + pub allow_network: Option, + #[serde( + rename = "env_vars", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub env_vars: Option>>, +} + +impl WorkspaceIn { + pub fn new(name: String) -> WorkspaceIn { + WorkspaceIn { + name, + path: None, + allow_network: None, + env_vars: None, + } + } +} diff --git a/pipelit-client/src/models/workspace_out.rs b/pipelit-client/src/models/workspace_out.rs new file mode 100644 index 0000000..dcadfb4 --- /dev/null +++ b/pipelit-client/src/models/workspace_out.rs @@ -0,0 +1,48 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct WorkspaceOut { + #[serde(rename = "id")] + pub id: i32, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "path")] + pub path: String, + #[serde(rename = "allow_network")] + pub allow_network: bool, + #[serde(rename = "env_vars")] + pub env_vars: Vec, + #[serde(rename = "created_at")] + pub created_at: String, +} + +impl WorkspaceOut { + pub fn new( + id: i32, + name: String, + path: String, + allow_network: bool, + env_vars: Vec, + created_at: String, + ) -> WorkspaceOut { + WorkspaceOut { + id, + name, + path, + allow_network, + env_vars, + created_at, + } + } +} diff --git a/pipelit-client/src/models/workspace_update.rs b/pipelit-client/src/models/workspace_update.rs new file mode 100644 index 0000000..6342b88 --- /dev/null +++ b/pipelit-client/src/models/workspace_update.rs @@ -0,0 +1,39 @@ +/* + * Workflow Platform API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.2.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct WorkspaceUpdate { + #[serde( + rename = "allow_network", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub allow_network: Option>, + #[serde( + rename = "env_vars", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub env_vars: Option>>, +} + +impl WorkspaceUpdate { + pub fn new() -> WorkspaceUpdate { + WorkspaceUpdate { + allow_network: None, + env_vars: None, + } + } +} diff --git a/scripts/generate-client.sh b/scripts/generate-client.sh new file mode 100755 index 0000000..8fce611 --- /dev/null +++ b/scripts/generate-client.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Generate the pipelit-client Rust crate from Pipelit's OpenAPI spec. +# Usage: ./scripts/generate-client.sh [path-to-openapi.json] +# +# If no path is given, fetches from http://localhost:8000/openapi.json + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" +CLIENT_DIR="$REPO_ROOT/pipelit-client" +SPEC="${1:-}" + +if [ -z "$SPEC" ]; then + SPEC="/tmp/pipelit-openapi.json" + echo "Fetching OpenAPI spec from http://localhost:8000/openapi.json..." + curl -sf http://localhost:8000/openapi.json > "$SPEC" +fi + +echo "Spec: $SPEC" +echo "Output: $CLIENT_DIR" + +# Preserve our Cargo.toml (don't let generator overwrite it) +cp "$CLIENT_DIR/Cargo.toml" /tmp/pipelit-client-cargo.toml.bak + +# Generate +docker run --rm \ + --user "$(id -u):$(id -g)" \ + -v "$SPEC:/spec/openapi.json:ro" \ + -v "$CLIENT_DIR:/out" \ + openapitools/openapi-generator-cli:latest generate \ + -i /spec/openapi.json \ + -g rust \ + -o /out \ + --library reqwest \ + --additional-properties=packageName=pipelit-client,supportAsync=true + +# Restore our Cargo.toml +mv /tmp/pipelit-client-cargo.toml.bak "$CLIENT_DIR/Cargo.toml" + +# Clean up generator artifacts +rm -rf "$CLIENT_DIR/.openapi-generator" "$CLIENT_DIR/.travis.yml" \ + "$CLIENT_DIR/git_push.sh" "$CLIENT_DIR/.openapi-generator-ignore" + +# Post-generation fixups: +# 1. Replace broken AnyOf types with serde_json::Value +find "$CLIENT_DIR/src" -name '*.rs' -exec \ + sed -i 's/Option>>/Option/g' {} + + +# 2. Remove double_option serde attrs on those fields +find "$CLIENT_DIR/src" -name '*.rs' -exec \ + sed -i 's/, default, with = "::serde_with::rust::double_option"//g' {} + + +# Format +cargo fmt --manifest-path "$CLIENT_DIR/Cargo.toml" 2>/dev/null || true + +echo "" +echo "Done. Verify with: cargo build --manifest-path $CLIENT_DIR/Cargo.toml" diff --git a/src/commands/auth.rs b/src/commands/auth.rs index 64feeb8..e64f472 100644 --- a/src/commands/auth.rs +++ b/src/commands/auth.rs @@ -2,6 +2,10 @@ use std::path::PathBuf; use anyhow::{Context, Result}; use clap::Subcommand; +use pipelit_client::apis::Error as ApiError; +use pipelit_client::apis::auth_api; +use pipelit_client::apis::configuration::Configuration; +use pipelit_client::models::{MfaLoginVerifyRequest, TokenRequest}; use serde::{Deserialize, Serialize}; use super::init::config::config_dir; @@ -81,6 +85,31 @@ fn clear_auth() -> Result<()> { Ok(()) } +#[allow(dead_code)] +pub fn pipelit_config() -> Result { + let auth = load_auth().context("Not logged in. Run `plit auth login` first.")?; + Ok(Configuration { + base_path: auth.pipelit_url, + bearer_access_token: Some(auth.token), + ..Configuration::default() + }) +} + +fn anon_config(url: &str) -> Configuration { + Configuration { + base_path: url.trim_end_matches('/').to_string(), + ..Configuration::default() + } +} + +fn authed_config(url: &str, token: &str) -> Configuration { + Configuration { + base_path: url.trim_end_matches('/').to_string(), + bearer_access_token: Some(token.to_string()), + ..Configuration::default() + } +} + pub async fn run(cmd: AuthCommands) -> Result<()> { match cmd { AuthCommands::Login { @@ -100,10 +129,8 @@ async fn login( password_arg: Option, token_arg: Option, ) -> Result<()> { - let client = reqwest::Client::new(); - let (key, username) = if let Some(token) = token_arg { - let username = verify_token(&client, url, &token).await?; + let username = verify_token(url, &token).await?; (token, username) } else { let username = match username_arg { @@ -120,11 +147,11 @@ async fn login( .interact()?, }; - let key = authenticate(&client, url, &username, &password).await?; + let key = authenticate(url, &username, &password).await?; (key, username) }; - verify_token(&client, url, &key).await?; + verify_token(url, &key).await?; save_auth(&AuthConfig { token: key, @@ -136,112 +163,73 @@ async fn login( Ok(()) } -async fn authenticate( - client: &reqwest::Client, - url: &str, - username: &str, - password: &str, -) -> Result { - let resp = client - .post(format!("{}/api/v1/auth/token/", url)) - .json(&serde_json::json!({"username": username, "password": password})) - .send() - .await - .map_err(|e| { - if e.is_connect() { - anyhow::anyhow!("Cannot connect to {url}. Is the server running?") - } else { - anyhow::anyhow!("Request failed: {e}") - } - })?; +async fn authenticate(url: &str, username: &str, password: &str) -> Result { + let config = anon_config(url); + let req = TokenRequest::new(username.to_string(), password.to_string()); - let status = resp.status(); - if status == reqwest::StatusCode::UNAUTHORIZED || status == reqwest::StatusCode::FORBIDDEN { - anyhow::bail!("Invalid credentials"); - } - if !status.is_success() { - let body = resp.text().await.unwrap_or_default(); - anyhow::bail!("Login failed (HTTP {status}): {body}"); - } + let resp = auth_api::obtain_token_api_v1_auth_token_post(&config, req).await; - let body: serde_json::Value = resp - .json() - .await - .context("Failed to parse login response")?; - let requires_mfa = body["requires_mfa"].as_bool().unwrap_or(false); - let key = body["key"] - .as_str() - .context("Missing 'key' in login response")? - .to_string(); - - if requires_mfa { - return handle_mfa(client, url, username, &key).await; + match resp { + Ok(token_resp) => { + if token_resp.requires_mfa.unwrap_or(false) { + return handle_mfa(url, username, &token_resp.key).await; + } + Ok(token_resp.key) + } + Err(ApiError::Reqwest(e)) if e.is_connect() => { + anyhow::bail!("Cannot connect to {url}. Is the server running?") + } + Err(ApiError::ResponseError(e)) if e.status == reqwest::StatusCode::UNAUTHORIZED => { + anyhow::bail!("Invalid credentials") + } + Err(ApiError::ResponseError(e)) => { + anyhow::bail!("Login failed (HTTP {}): {}", e.status, e.content) + } + Err(e) => anyhow::bail!("Login failed: {e}"), } - - Ok(key) } -async fn handle_mfa( - client: &reqwest::Client, - url: &str, - username: &str, - _initial_key: &str, -) -> Result { +async fn handle_mfa(url: &str, username: &str, _initial_key: &str) -> Result { let code: String = dialoguer::Input::new() .with_prompt("MFA code") .interact_text()?; - let resp = client - .post(format!("{}/api/v1/auth/mfa/login-verify/", url)) - .json(&serde_json::json!({"username": username, "code": code})) - .send() - .await - .map_err(|e| anyhow::anyhow!("MFA verification request failed: {e}"))?; - - let status = resp.status(); - if !status.is_success() { - let body = resp.text().await.unwrap_or_default(); - anyhow::bail!("MFA verification failed (HTTP {status}): {body}"); - } + let config = anon_config(url); + let req = MfaLoginVerifyRequest::new(username.to_string(), code); + + let resp = auth_api::mfa_login_verify_api_v1_auth_mfa_login_verify_post(&config, req).await; - let body: serde_json::Value = resp.json().await.context("Failed to parse MFA response")?; - body["key"] - .as_str() - .map(String::from) - .context("Missing 'key' in MFA response") + match resp { + Ok(token_resp) => Ok(token_resp.key), + Err(ApiError::ResponseError(e)) => { + anyhow::bail!("MFA verification failed (HTTP {}): {}", e.status, e.content) + } + Err(e) => anyhow::bail!("MFA verification failed: {e}"), + } } -async fn verify_token(client: &reqwest::Client, url: &str, token: &str) -> Result { - let resp = client - .get(format!("{}/api/v1/auth/me/", url)) - .header("Authorization", format!("Bearer {token}")) - .send() - .await - .map_err(|e| { - if e.is_connect() { - anyhow::anyhow!("Cannot connect to {url}. Is the server running?") - } else { - anyhow::anyhow!("Request failed: {e}") - } - })?; +async fn verify_token(url: &str, token: &str) -> Result { + let config = authed_config(url, token); - let status = resp.status(); - if status == reqwest::StatusCode::UNAUTHORIZED { - anyhow::bail!("Token expired or invalid. Run `plit auth login` again."); - } - if !status.is_success() { - let body = resp.text().await.unwrap_or_default(); - anyhow::bail!("Token verification failed (HTTP {status}): {body}"); - } + let resp = auth_api::me_api_v1_auth_me_get(&config).await; - let body: serde_json::Value = resp - .json() - .await - .context("Failed to parse user info response")?; - body["username"] - .as_str() - .map(String::from) - .context("Missing 'username' in user info response") + match resp { + Ok(me) => Ok(me.username), + Err(ApiError::Reqwest(e)) if e.is_connect() => { + anyhow::bail!("Cannot connect to {url}. Is the server running?") + } + Err(ApiError::ResponseError(e)) if e.status == reqwest::StatusCode::UNAUTHORIZED => { + anyhow::bail!("Token expired or invalid. Run `plit auth login` again.") + } + Err(ApiError::ResponseError(e)) => { + anyhow::bail!( + "Token verification failed (HTTP {}): {}", + e.status, + e.content + ) + } + Err(e) => anyhow::bail!("Token verification failed: {e}"), + } } async fn status() -> Result<()> { @@ -253,30 +241,18 @@ async fn status() -> Result<()> { } }; - let client = reqwest::Client::new(); - let resp = client - .get(format!("{}/api/v1/auth/me/", auth.pipelit_url)) - .header("Authorization", format!("Bearer {}", auth.token)) - .send() - .await; - - match resp { - Ok(r) if r.status().is_success() => { + let config = authed_config(&auth.pipelit_url, &auth.token); + match auth_api::me_api_v1_auth_me_get(&config).await { + Ok(_) => { output::status(&format!( "Logged in as {} at {}", auth.username, auth.pipelit_url )); } - Ok(r) if r.status() == reqwest::StatusCode::UNAUTHORIZED => { + Err(ApiError::ResponseError(e)) if e.status == reqwest::StatusCode::UNAUTHORIZED => { output::status("Token expired or invalid. Run `plit auth login` again."); } - Ok(r) => { - output::status(&format!( - "Unexpected response (HTTP {}). Try `plit auth login` again.", - r.status() - )); - } - Err(e) if e.is_connect() => { + Err(ApiError::Reqwest(e)) if e.is_connect() => { output::status(&format!( "Cannot reach {}. Server may be down.", auth.pipelit_url