diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a4ccfaf..355ca14 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,3 +37,7 @@ jobs: - name: Run Lint run: | uv run ruff check . + + - name: Run type checking + run: | + uv run basedpyright diff --git a/README.md b/README.md index 50224d8..324069b 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,6 @@ pip install robosystems-client[tables] pip install robosystems-client[all] ``` -See the [examples](./examples) directory for usage guides. - ## API Reference - [API reference](https://api.robosystems.ai) diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index a5b01aa..0000000 --- a/examples/README.md +++ /dev/null @@ -1,272 +0,0 @@ -# RoboSystems Python Client Examples - -This directory contains examples demonstrating how to use the RoboSystems Python Client SDK for various common workflows. - -## Prerequisites - -```bash -# Basic installation (for querying only) -pip install robosystems-client - -# With table ingestion support (for uploading Parquet files) -pip install robosystems-client[tables] - -# Or install all optional features -pip install robosystems-client[all] -``` - -## Examples - -### 1. Basic Query (`basic_query.py`) - -**Demonstrates:** Simple querying of an existing graph - -The simplest way to get started with the RoboSystems Python SDK. This example shows how to: -- Initialize the SDK with an API key -- Execute Cypher queries against a graph -- Display query results - -**Usage:** -```bash -python examples/basic_query.py \ - --api-key YOUR_API_KEY \ - --graph-id YOUR_GRAPH_ID \ - --base-url http://localhost:8000 -``` - -**Key Features:** -- Minimal setup -- Multiple query examples (count nodes, list labels, sample data) -- Proper error handling -- Clean resource management - ---- - -### 2. End-to-End Workflow (`e2e_workflow.py`) - -**Demonstrates:** Complete workflow from user creation to querying - -This comprehensive example shows the full RoboSystems workflow: -- User creation and authentication -- API key generation -- Graph creation -- Parquet file upload to staging tables -- Table ingestion into the graph -- Querying the populated graph - -**Usage:** - -**With new user creation:** -```bash -python examples/e2e_workflow.py -``` -This will auto-generate credentials and walk through the entire setup. - -**With existing API key:** -```bash -python examples/e2e_workflow.py --api-key YOUR_API_KEY -``` - -**Custom configuration:** -```bash -python examples/e2e_workflow.py \ - --name "John Doe" \ - --email "john@example.com" \ - --password "YourSecurePassword123!" \ - --base-url http://localhost:8000 -``` - -**Key Features:** -- Automated user setup -- Sample data generation (creates Parquet files) -- **TableIngestClient** extension usage for simplified uploads -- Progress callbacks -- LocalStack URL auto-fix for local development -- Multiple query examples - ---- - -## Extension Features Demonstrated - -### TableIngestClient - -The examples showcase the new `TableIngestClient` extension which dramatically simplifies the table upload process: - -**Before (Raw API calls - 3 steps):** -```python -# Step 1: Get presigned upload URL -response = client.post(f"{base_url}/v1/graphs/{graph_id}/tables/{table_name}/files", ...) -upload_url = response.json()["upload_url"] -file_id = response.json()["file_id"] - -# Step 2: Upload to S3 -with open(file_path, "rb") as f: - s3_client.put(upload_url, data=f.read()) - -# Step 3: Update file metadata -client.patch(f"{base_url}/v1/graphs/{graph_id}/tables/files/{file_id}", ...) -``` - -**After (SDK with TableIngestClient):** -```python -from robosystems_client.extensions import UploadOptions - -# All 3 steps in one call! -upload_result = extensions.tables.upload_parquet_file( - graph_id, - table_name, - file_path, - UploadOptions(on_progress=lambda msg: print(msg)) -) -``` - -**Additional TableIngestClient Methods:** -- `list_staging_tables(graph_id)` - List all staging tables -- `ingest_all_tables(graph_id, options)` - Ingest tables into graph -- `upload_and_ingest(graph_id, table_name, file_path, ...)` - Upload + ingest in one call - ---- - -## Common Patterns - -### Initializing the SDK - -```python -from robosystems_client.extensions import ( - RoboSystemsExtensions, - RoboSystemsExtensionConfig, -) - -# With API key -config = RoboSystemsExtensionConfig( - base_url="http://localhost:8000", - headers={"X-API-Key": "your-api-key"} -) -extensions = RoboSystemsExtensions(config) - -# Always close when done -extensions.close() -``` - -### Uploading Data - -```python -from robosystems_client.extensions import UploadOptions, IngestOptions -from pathlib import Path - -# Upload a parquet file -upload_options = UploadOptions( - on_progress=lambda msg: print(f"Upload: {msg}"), - fix_localstack_url=True # Auto-fix for local development -) - -result = extensions.tables.upload_parquet_file( - graph_id="your-graph-id", - table_name="Entity", - file_path=Path("data/entities.parquet"), - options=upload_options -) - -if result.success: - print(f"āœ… Uploaded {result.row_count:,} rows") -else: - print(f"āŒ Upload failed: {result.error}") - -# Ingest the uploaded tables -ingest_options = IngestOptions( - ignore_errors=True, # Continue on errors - rebuild=False, # Don't rebuild existing data - on_progress=lambda msg: print(f"Ingest: {msg}") -) - -ingest_result = extensions.tables.ingest_all_tables( - graph_id="your-graph-id", - options=ingest_options -) -``` - -### Querying Data - -```python -# Simple query -result = extensions.query.query( - graph_id="your-graph-id", - query="MATCH (n:Entity) RETURN count(n) AS total" -) - -print(f"Total nodes: {result.data[0]['total']}") - -# Query with parameters -result = extensions.query.query( - graph_id="your-graph-id", - query="MATCH (n:Entity) WHERE n.ticker = $ticker RETURN n", - parameters={"ticker": "AAPL"} -) - -for node in result.data: - print(f"Found: {node}") -``` - -## Environment Variables - -You can also use environment variables for configuration: - -```bash -export ROBOSYSTEMS_API_URL="http://localhost:8000" -export ROBOSYSTEMS_API_KEY="your-api-key" -export ROBOSYSTEMS_GRAPH_ID="your-graph-id" -``` - -Then reference them in your code: -```python -import os - -config = RoboSystemsExtensionConfig( - base_url=os.getenv("ROBOSYSTEMS_API_URL", "http://localhost:8000"), - headers={"X-API-Key": os.getenv("ROBOSYSTEMS_API_KEY")} -) -``` - -## Comparison with Raw API Approach - -| Operation | Raw httpx Calls | SDK with Extensions | Lines of Code Reduction | -|-----------|----------------|---------------------|------------------------| -| Upload file to table | ~25 lines (3 API calls) | ~6 lines (1 method) | **76% reduction** | -| Query graph | ~10 lines | ~3 lines | **70% reduction** | -| List tables | ~8 lines | ~2 lines | **75% reduction** | - -**Benefits of Using the SDK:** -- Type-safe model classes -- Automatic error handling -- Progress callbacks -- Connection pooling -- Cleaner, more maintainable code -- Built-in support for async operations - -## Additional Resources - -- **API Documentation:** https://api.robosystems.ai/docs -- **Main Repository:** https://github.com/RoboSystems/robosystems-python-client -- **Extension Documentation:** See `robosystems_client/extensions/README.md` - -## Getting Help - -If you encounter issues: -1. Check the error message and stack trace -2. Verify your API key and graph ID are correct -3. Ensure the API server is running (for local development) -4. Check the API documentation for endpoint changes -5. Open an issue on GitHub with a minimal reproducible example - -## Contributing - -Have a useful example to share? Contributions are welcome! - -1. Fork the repository -2. Create a new example file following the existing patterns -3. Update this README with your example -4. Submit a pull request - ---- - -**Happy coding with RoboSystems! šŸ¤–** diff --git a/examples/basic_query.py b/examples/basic_query.py deleted file mode 100644 index 55e712e..0000000 --- a/examples/basic_query.py +++ /dev/null @@ -1,99 +0,0 @@ -""" -Simple example of querying a RoboSystems graph using the Python SDK. - -This example demonstrates the simplest way to execute queries against -an existing graph using the RoboSystems Python Client SDK. - -Usage: - python examples/basic_query.py --api-key --graph-id -""" - -import argparse -import json -import sys - -from robosystems_client.extensions import ( - RoboSystemsExtensions, - RoboSystemsExtensionConfig, -) - - -def run_query_example( - api_key: str, graph_id: str, base_url: str = "http://localhost:8000" -): - """Run simple query examples against a graph.""" - print("\n" + "=" * 60) - print("šŸ” RoboSystems Query Example (SDK)") - print("=" * 60) - - # Initialize extensions with API key - config = RoboSystemsExtensionConfig(base_url=base_url, headers={"X-API-Key": api_key}) - extensions = RoboSystemsExtensions(config) - - # Example queries - queries = [ - {"name": "Count all nodes", "query": "MATCH (n) RETURN count(n) AS total_nodes"}, - { - "name": "Count nodes by label", - "query": "MATCH (n) RETURN labels(n) AS label, count(n) AS count ORDER BY count DESC LIMIT 10", - }, - {"name": "Sample nodes", "query": "MATCH (n) RETURN n LIMIT 5"}, - ] - - for example in queries: - print(f"\nšŸ“Š {example['name']}") - print(f" Query: {example['query']}") - - try: - # Execute the query - result = extensions.query.query(graph_id, example["query"]) - - # Display results - if hasattr(result, "data") and result.data: - print(f" āœ… Returned {len(result.data)} records") - - # Pretty print results - if len(result.data) <= 10: - print(" Results:") - print(" " + json.dumps(result.data, indent=4).replace("\n", "\n ")) - else: - print(f" Showing first 10 of {len(result.data)} records:") - print(" " + json.dumps(result.data[:10], indent=4).replace("\n", "\n ")) - else: - print(" āš ļø No results returned") - - except Exception as e: - print(f" āŒ Query failed: {e}") - - # Cleanup - extensions.close() - - print("\n" + "=" * 60) - print("āœ… Query examples complete!") - print("=" * 60 + "\n") - - -def main(): - parser = argparse.ArgumentParser(description="Simple RoboSystems query example") - parser.add_argument("--api-key", required=True, help="Your RoboSystems API key") - parser.add_argument("--graph-id", required=True, help="The graph ID to query") - parser.add_argument( - "--base-url", - default="http://localhost:8000", - help="API base URL (default: http://localhost:8000)", - ) - - args = parser.parse_args() - - try: - run_query_example(args.api_key, args.graph_id, args.base_url) - except Exception as e: - print(f"\nāŒ Error: {e}") - import traceback - - traceback.print_exc() - sys.exit(1) - - -if __name__ == "__main__": - main() diff --git a/examples/e2e_workflow.py b/examples/e2e_workflow.py deleted file mode 100644 index d3a10eb..0000000 --- a/examples/e2e_workflow.py +++ /dev/null @@ -1,445 +0,0 @@ -""" -End-to-end workflow demonstration using RoboSystems Python Client SDK. - -This script demonstrates the complete RoboSystems workflow: -1. User creation (or use existing API key) -2. Graph creation -3. Parquet file upload to staging tables -4. Data ingestion into graph -5. Graph querying - -Usage: - python examples/e2e_workflow.py --api-key # Use existing API key - python examples/e2e_workflow.py # Create new user - python examples/e2e_workflow.py --use-buffer # Use in-memory buffer instead of file - -Dependencies: - pip install robosystems-client[tables] -""" - -import argparse -import json -import secrets -import string -import sys -import time -from pathlib import Path -from typing import Optional - -import pandas as pd -import pyarrow as pa -import pyarrow.parquet as pq - -from robosystems_client import Client -from robosystems_client.extensions import ( - RoboSystemsExtensions, - RoboSystemsExtensionConfig, - UploadOptions, - IngestOptions, -) -from robosystems_client.api.auth.register_user import sync_detailed as register -from robosystems_client.api.auth.login_user import sync_detailed as login -from robosystems_client.api.user.create_user_api_key import ( - sync_detailed as create_api_key, -) -from robosystems_client.api.graphs.create_graph import sync_detailed as create_graph -from robosystems_client.models.register_request import RegisterRequest -from robosystems_client.models.login_request import LoginRequest -from robosystems_client.models.create_api_key_request import CreateAPIKeyRequest -from robosystems_client.models.create_graph_request import CreateGraphRequest -from robosystems_client.models.graph_metadata import GraphMetadata - - -def generate_secure_password(length: int = 16) -> str: - """Generate a cryptographically secure password.""" - chars_per_type = length // 4 - password = ( - "".join(secrets.choice(string.ascii_lowercase) for _ in range(chars_per_type)) - + "".join(secrets.choice(string.ascii_uppercase) for _ in range(chars_per_type)) - + "".join(secrets.choice(string.digits) for _ in range(chars_per_type)) - + "".join(secrets.choice("!@#$%^&*") for _ in range(chars_per_type)) - ) - password_list = list(password) - secrets.SystemRandom().shuffle(password_list) - return "".join(password_list) - - -def create_sample_dataframe(num_rows: int = 100) -> pd.DataFrame: - """Create a sample DataFrame with entity data.""" - return pd.DataFrame( - { - "identifier": [f"entity_{i:03d}" for i in range(1, num_rows + 1)], - "uri": [None] * num_rows, - "scheme": [None] * num_rows, - "cik": [None] * num_rows, - "ticker": [f"TKR{i}" if i % 10 == 0 else None for i in range(1, num_rows + 1)], - "exchange": [None] * num_rows, - "name": [f"Entity_{i}" for i in range(1, num_rows + 1)], - "legal_name": [None] * num_rows, - "industry": [None] * num_rows, - "entity_type": [None] * num_rows, - "sic": [None] * num_rows, - "sic_description": [None] * num_rows, - "category": [f"Category_{i % 5}" for i in range(1, num_rows + 1)], - "state_of_incorporation": [None] * num_rows, - "fiscal_year_end": [None] * num_rows, - "ein": [None] * num_rows, - "tax_id": [None] * num_rows, - "lei": [None] * num_rows, - "phone": [None] * num_rows, - "website": [None] * num_rows, - "status": [None] * num_rows, - "is_parent": pd.Series([None] * num_rows, dtype="boolean"), - "parent_entity_id": [None] * num_rows, - "created_at": pd.date_range("2025-01-01", periods=num_rows, freq="h").strftime( - "%Y-%m-%d %H:%M:%S" - ), - "updated_at": [None] * num_rows, - } - ) - - -def create_sample_parquet(output_path: Path, num_rows: int = 100): - """Create a sample Parquet file with entity data.""" - print(f"\nšŸ“„ Creating sample Parquet file with {num_rows} rows...") - - df = create_sample_dataframe(num_rows) - table = pa.Table.from_pandas(df) - pq.write_table(table, output_path) - - print(f"āœ… Created {output_path.name} ({output_path.stat().st_size:,} bytes)") - return df - - -def setup_user_and_api_key( - base_url: str, - name: Optional[str] = None, - email: Optional[str] = None, - password: Optional[str] = None, -) -> str: - """Create a new user and generate an API key.""" - client = Client(base_url=base_url) - - # Generate credentials if not provided - if not name or not email or not password: - timestamp = int(time.time()) - name = name or f"Demo User {timestamp}" - email = email or f"demo_{timestamp}@example.com" - password = password or generate_secure_password() - - print("\nšŸ“§ Auto-generated credentials:") - print(f" Name: {name}") - print(f" Email: {email}") - print(f" Password: {password}") - - # Create user - print("\nšŸ” Creating new user...") - user_create = RegisterRequest(name=name, email=email, password=password) - response = register(client=client, body=user_create) - if not response.parsed: - raise Exception("Failed to create user") - print(f"āœ… User created: {name} ({email})") - - # Login - print("\nšŸ”‘ Logging in...") - user_login = LoginRequest(email=email, password=password) - response = login(client=client, body=user_login) - if not response.parsed: - raise Exception("Failed to login") - token = response.parsed.token - print("āœ… Login successful") - - # Create API key - print("\nšŸ”‘ Creating API key...") - api_key_create = CreateAPIKeyRequest(name=f"E2E Demo Key - {name}") - response = create_api_key(client=client, token=token, body=api_key_create) - if not response.parsed: - raise Exception("Failed to create API key") - api_key = response.parsed.key - print(f"āœ… API key created: {api_key[:20]}...") - - return api_key - - -def create_demo_graph(base_url: str, api_key: str) -> str: - """Create a new graph for the demo.""" - client = Client(base_url=base_url, headers={"X-API-Key": api_key}) - - graph_name = f"demo_graph_{int(time.time())}" - print(f"\nšŸ“Š Creating graph: {graph_name}...") - - metadata = GraphMetadata( - graph_name=graph_name, - description=f"E2E workflow demo graph - {graph_name}", - ) - graph_create = CreateGraphRequest(metadata=metadata) - - response = create_graph(client=client, body=graph_create) - - if not response.parsed: - error_msg = f"Failed to create graph. Status: {response.status_code}" - if hasattr(response, "content"): - error_msg += f", Response: {response.content}" - raise Exception(error_msg) - - # Handle async graph creation - # Response can be either a dict or an object - if isinstance(response.parsed, dict): - graph_id = response.parsed.get("graph_id") - operation_id = response.parsed.get("operation_id") - else: - graph_id = getattr(response.parsed, "graph_id", None) - operation_id = getattr(response.parsed, "operation_id", None) - - if graph_id: - print(f"āœ… Graph created: {graph_id}") - return graph_id - elif operation_id: - print(f"āš ļø Graph creation queued. Operation ID: {operation_id}") - print(" Polling for completion...") - - # Use simple polling for fast operations like graph creation - # (SSE connection establishment takes longer than graph creation itself ~0.3s) - from robosystems_client.api.operations.get_operation_status import ( - sync_detailed as get_status, - ) - - max_attempts = 20 - for attempt in range(max_attempts): - time.sleep(0.5) # Poll every 500ms - - status_response = get_status(operation_id=operation_id, client=client) - - if status_response.parsed: - # Response is stored in additional_properties dict - status = status_response.parsed["status"] - print(f" Status: {status}") - - if status == "completed": - result = status_response.parsed["result"] - if isinstance(result, dict): - graph_id = result.get("graph_id") - else: - graph_id = getattr(result, "graph_id", None) - - if graph_id: - print(f"āœ… Graph created: {graph_id}") - return graph_id - else: - raise Exception("Operation completed but no graph_id in result") - - elif status == "failed": - error = ( - status_response.parsed.get("error") - if isinstance(status_response.parsed, dict) - else status_response.parsed["error"] - if "error" in status_response.parsed - else "Unknown error" - ) - raise Exception(f"Graph creation failed: {error}") - - raise Exception(f"Graph creation timed out after {max_attempts * 0.5}s") - else: - raise Exception( - f"Unexpected response from graph creation. Response: {response.parsed}" - ) - - -def run_workflow( - base_url: str = "http://localhost:8000", - name: Optional[str] = None, - email: Optional[str] = None, - password: Optional[str] = None, - api_key: Optional[str] = None, - graph_id: Optional[str] = None, # Reuse existing graph - use_buffer: bool = False, # Use buffer instead of file path -): - """Run the complete E2E workflow.""" - print("\n" + "=" * 60) - print("šŸ¤– RoboSystems E2E Workflow Demo (SDK Version)") - print("=" * 60) - - # Step 1: Get or create API key - if api_key: - print("\nāœ… Using provided API key") - else: - api_key = setup_user_and_api_key(base_url, name, email, password) - - # Step 2: Create or reuse graph - if graph_id: - print(f"\nāœ… Using existing graph: {graph_id}") - else: - graph_id = create_demo_graph(base_url, api_key) - - # Step 3: Initialize extensions with API key - config = RoboSystemsExtensionConfig(base_url=base_url, headers={"X-API-Key": api_key}) - extensions = RoboSystemsExtensions(config) - - # Step 4: Create and upload sample data - table_name = "Entity" - - if use_buffer: - # Buffer-based approach (no disk I/O required) - print("\nšŸ“„ Creating sample Parquet data in-memory (50 rows)...") - - df = create_sample_dataframe(num_rows=50) - - # Convert to Parquet in-memory - from io import BytesIO - - buffer = BytesIO() - table = pa.Table.from_pandas(df) - pq.write_table(table, buffer) - buffer.seek(0) - - print(f"āœ… Created in-memory buffer ({len(buffer.getvalue()):,} bytes)") - - # Step 5: Upload from buffer - upload_options = UploadOptions( - on_progress=lambda msg: print(f" {msg}"), - fix_localstack_url=True, - file_name="sample_data.parquet", # Override file name for buffer - ) - - upload_result = extensions.tables.upload_parquet_file( - graph_id, table_name, buffer, upload_options - ) - else: - # File-based approach (traditional) - temp_dir = Path("/tmp/robosystems_demo") - temp_dir.mkdir(exist_ok=True) - parquet_file = temp_dir / "sample_data.parquet" - - _df = create_sample_parquet(parquet_file, num_rows=50) - - # Step 5: Upload parquet file using the new TableIngestClient - upload_options = UploadOptions( - on_progress=lambda msg: print(f" {msg}"), - fix_localstack_url=True, - ) - - upload_result = extensions.tables.upload_parquet_file( - graph_id, table_name, parquet_file, upload_options - ) - - if not upload_result.success: - print(f"āŒ Upload failed: {upload_result.error}") - sys.exit(1) - - # Step 6: List staging tables - print("\nšŸ“‹ Listing staging tables...") - tables = extensions.tables.list_staging_tables(graph_id) - - if tables: - print("\nStaging Tables:") - print( - f"{'Table Name':<20} {'Row Count':<12} {'File Count':<12} {'Size (bytes)':<15}" - ) - print("-" * 60) - for tbl in tables: - print( - f"{tbl.table_name:<20} {tbl.row_count:<12} {tbl.file_count:<12} {tbl.total_size_bytes:>14,}" - ) - else: - print("No tables found") - - # Step 7: Ingest tables - print("\nāš™ļø Ingesting all tables to graph...") - ingest_options = IngestOptions( - ignore_errors=True, rebuild=False, on_progress=lambda msg: print(f" {msg}") - ) - - ingest_result = extensions.tables.ingest_all_tables(graph_id, ingest_options) - - if not ingest_result.get("success"): - print(f"āŒ Ingestion failed: {ingest_result.get('error')}") - sys.exit(1) - - # Step 8: Query the graph - queries = [ - "MATCH (n:Entity) RETURN count(n) AS total_nodes", - "MATCH (n:Entity) RETURN n.identifier, n.name, n.ticker, n.category LIMIT 5", - "MATCH (n:Entity) WHERE n.ticker IS NOT NULL RETURN n.identifier, n.name, n.ticker ORDER BY n.identifier DESC LIMIT 10", - ] - - for query in queries: - print(f"\nšŸ” Executing query: {query}") - result = extensions.query.query(graph_id, query) - - if hasattr(result, "data") and result.data: - print(f"āœ… Query returned {len(result.data)} records") - if len(result.data) <= 10: - print(json.dumps(result.data, indent=2)) - else: - print(f"Showing first 10 of {len(result.data)} records:") - print(json.dumps(result.data[:10], indent=2)) - else: - print("āŒ Query returned no results or error") - - # Cleanup - extensions.close() - if not use_buffer: - parquet_file.unlink() - - print("\n" + "=" * 60) - print("āœ… E2E Workflow Complete!") - print("=" * 60) - print(f"\nšŸ“Š Graph ID: {graph_id}") - print(f"šŸ”‘ API Key: {api_key}") - if use_buffer: - print("šŸ’” Note: Used in-memory buffer (no /tmp file created)") - print("\nšŸ’” You can continue querying this graph using the API key\n") - - -def main(): - parser = argparse.ArgumentParser( - description="RoboSystems E2E workflow demonstration using SDK" - ) - parser.add_argument( - "--api-key", - help="Use existing API key (skip user creation)", - ) - parser.add_argument( - "--name", - help="Name for new user (auto-generated if not provided)", - ) - parser.add_argument( - "--email", - help="Email for new user (auto-generated if not provided)", - ) - parser.add_argument( - "--password", - help="Password for new user (auto-generated if not provided)", - ) - parser.add_argument( - "--base-url", - default="http://localhost:8000", - help="API base URL (default: http://localhost:8000)", - ) - parser.add_argument( - "--use-buffer", - action="store_true", - help="Use in-memory buffer instead of file path (demonstrates buffer upload)", - ) - - args = parser.parse_args() - - try: - run_workflow( - base_url=args.base_url, - name=args.name, - email=args.email, - password=args.password, - api_key=args.api_key, - use_buffer=args.use_buffer, - ) - except Exception as e: - print(f"\nāŒ Error: {e}") - import traceback - - traceback.print_exc() - sys.exit(1) - - -if __name__ == "__main__": - main() diff --git a/justfile b/justfile index 2ef728f..a266b95 100644 --- a/justfile +++ b/justfile @@ -28,6 +28,7 @@ test-all: @just test @just lint @just format + @just typecheck # Run linting lint: @@ -40,7 +41,7 @@ format: # Run type checking typecheck: - uv run pyright + uv run basedpyright # Generate SDK from localhost API generate-sdk url="http://localhost:8000/openapi.json": diff --git a/pyproject.toml b/pyproject.toml index 6de95ad..c582abb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ [project.optional-dependencies] dev = [ "openapi-python-client>=0.21.8", - "pyright>=1.1.402", + "basedpyright>=1.21.0", "pytest-asyncio>=0.26.0", "pytest>=8.3.5", "ruff>=0.12", @@ -73,8 +73,8 @@ build-backend = "hatchling.build" packages = ["robosystems_client"] [tool.basedpyright] -include = [] -exclude = ["**/*"] +include = ["robosystems_client/extensions"] +exclude = ["robosystems_client/extensions/tests"] extraPaths = ["."] pythonVersion = "3.12" venvPath = "." @@ -85,3 +85,5 @@ reportArgumentType = "none" reportGeneralTypeIssues = "none" reportOptionalMemberAccess = "none" reportReturnType = "none" +reportInvalidTypeForm = "none" +reportMissingImports = "none" diff --git a/robosystems_client/api/agent/auto_select_agent.py b/robosystems_client/api/agent/auto_select_agent.py index 4aacaf4..9179630 100644 --- a/robosystems_client/api/agent/auto_select_agent.py +++ b/robosystems_client/api/agent/auto_select_agent.py @@ -9,35 +9,19 @@ from ...models.agent_response import AgentResponse from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, *, body: AgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/agent", - "params": params, } _kwargs["json"] = body.to_dict() @@ -100,8 +84,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: AgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Auto-select agent for query @@ -117,8 +99,6 @@ def sync_detailed( Args: graph_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. Raises: @@ -132,8 +112,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -148,8 +126,6 @@ def sync( *, client: AuthenticatedClient, body: AgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Auto-select agent for query @@ -165,8 +141,6 @@ def sync( Args: graph_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. Raises: @@ -181,8 +155,6 @@ def sync( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -191,8 +163,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: AgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Auto-select agent for query @@ -208,8 +178,6 @@ async def asyncio_detailed( Args: graph_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. Raises: @@ -223,8 +191,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -237,8 +203,6 @@ async def asyncio( *, client: AuthenticatedClient, body: AgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Auto-select agent for query @@ -254,8 +218,6 @@ async def asyncio( Args: graph_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. Raises: @@ -271,7 +233,5 @@ async def asyncio( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/agent/batch_process_queries.py b/robosystems_client/api/agent/batch_process_queries.py index b705ad4..91e82b7 100644 --- a/robosystems_client/api/agent/batch_process_queries.py +++ b/robosystems_client/api/agent/batch_process_queries.py @@ -8,35 +8,19 @@ from ...models.batch_agent_request import BatchAgentRequest from ...models.batch_agent_response import BatchAgentResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, *, body: BatchAgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/agent/batch", - "params": params, } _kwargs["json"] = body.to_dict() @@ -94,8 +78,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: BatchAgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, BatchAgentResponse, HTTPValidationError]]: """Batch process multiple queries @@ -116,8 +98,6 @@ def sync_detailed( Args: graph_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (BatchAgentRequest): Request for batch processing multiple queries. Raises: @@ -131,8 +111,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -147,8 +125,6 @@ def sync( *, client: AuthenticatedClient, body: BatchAgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, BatchAgentResponse, HTTPValidationError]]: """Batch process multiple queries @@ -169,8 +145,6 @@ def sync( Args: graph_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (BatchAgentRequest): Request for batch processing multiple queries. Raises: @@ -185,8 +159,6 @@ def sync( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -195,8 +167,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: BatchAgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, BatchAgentResponse, HTTPValidationError]]: """Batch process multiple queries @@ -217,8 +187,6 @@ async def asyncio_detailed( Args: graph_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (BatchAgentRequest): Request for batch processing multiple queries. Raises: @@ -232,8 +200,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -246,8 +212,6 @@ async def asyncio( *, client: AuthenticatedClient, body: BatchAgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, BatchAgentResponse, HTTPValidationError]]: """Batch process multiple queries @@ -268,8 +232,6 @@ async def asyncio( Args: graph_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (BatchAgentRequest): Request for batch processing multiple queries. Raises: @@ -285,7 +247,5 @@ async def asyncio( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/agent/execute_specific_agent.py b/robosystems_client/api/agent/execute_specific_agent.py index cee6207..e91f6a6 100644 --- a/robosystems_client/api/agent/execute_specific_agent.py +++ b/robosystems_client/api/agent/execute_specific_agent.py @@ -9,7 +9,7 @@ from ...models.agent_response import AgentResponse from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( @@ -17,28 +17,12 @@ def _get_kwargs( agent_type: str, *, body: AgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/agent/{agent_type}", - "params": params, } _kwargs["json"] = body.to_dict() @@ -106,8 +90,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: AgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Execute specific agent @@ -123,8 +105,6 @@ def sync_detailed( Args: graph_id (str): agent_type (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. Raises: @@ -139,8 +119,6 @@ def sync_detailed( graph_id=graph_id, agent_type=agent_type, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -156,8 +134,6 @@ def sync( *, client: AuthenticatedClient, body: AgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Execute specific agent @@ -173,8 +149,6 @@ def sync( Args: graph_id (str): agent_type (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. Raises: @@ -190,8 +164,6 @@ def sync( agent_type=agent_type, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -201,8 +173,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: AgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Execute specific agent @@ -218,8 +188,6 @@ async def asyncio_detailed( Args: graph_id (str): agent_type (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. Raises: @@ -234,8 +202,6 @@ async def asyncio_detailed( graph_id=graph_id, agent_type=agent_type, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -249,8 +215,6 @@ async def asyncio( *, client: AuthenticatedClient, body: AgentRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Execute specific agent @@ -266,8 +230,6 @@ async def asyncio( Args: graph_id (str): agent_type (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. Raises: @@ -284,7 +246,5 @@ async def asyncio( agent_type=agent_type, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/agent/get_agent_metadata.py b/robosystems_client/api/agent/get_agent_metadata.py index aa2ecac..abb33b7 100644 --- a/robosystems_client/api/agent/get_agent_metadata.py +++ b/robosystems_client/api/agent/get_agent_metadata.py @@ -7,38 +7,18 @@ from ...client import AuthenticatedClient, Client from ...models.agent_metadata_response import AgentMetadataResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, agent_type: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/agent/{agent_type}/metadata", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -81,8 +61,6 @@ def sync_detailed( agent_type: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentMetadataResponse, Any, HTTPValidationError]]: """Get agent metadata @@ -99,10 +77,8 @@ def sync_detailed( Use this to understand agent capabilities before execution. Args: - graph_id (str): Graph database identifier + graph_id (str): agent_type (str): Agent type identifier (e.g., 'financial', 'research', 'rag') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -115,8 +91,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, agent_type=agent_type, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -131,8 +105,6 @@ def sync( agent_type: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentMetadataResponse, Any, HTTPValidationError]]: """Get agent metadata @@ -149,10 +121,8 @@ def sync( Use this to understand agent capabilities before execution. Args: - graph_id (str): Graph database identifier + graph_id (str): agent_type (str): Agent type identifier (e.g., 'financial', 'research', 'rag') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -166,8 +136,6 @@ def sync( graph_id=graph_id, agent_type=agent_type, client=client, - token=token, - authorization=authorization, ).parsed @@ -176,8 +144,6 @@ async def asyncio_detailed( agent_type: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentMetadataResponse, Any, HTTPValidationError]]: """Get agent metadata @@ -194,10 +160,8 @@ async def asyncio_detailed( Use this to understand agent capabilities before execution. Args: - graph_id (str): Graph database identifier + graph_id (str): agent_type (str): Agent type identifier (e.g., 'financial', 'research', 'rag') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -210,8 +174,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, agent_type=agent_type, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -224,8 +186,6 @@ async def asyncio( agent_type: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentMetadataResponse, Any, HTTPValidationError]]: """Get agent metadata @@ -242,10 +202,8 @@ async def asyncio( Use this to understand agent capabilities before execution. Args: - graph_id (str): Graph database identifier + graph_id (str): agent_type (str): Agent type identifier (e.g., 'financial', 'research', 'rag') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -260,7 +218,5 @@ async def asyncio( graph_id=graph_id, agent_type=agent_type, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/agent/list_agents.py b/robosystems_client/api/agent/list_agents.py index 7e0f378..765ce27 100644 --- a/robosystems_client/api/agent/list_agents.py +++ b/robosystems_client/api/agent/list_agents.py @@ -14,13 +14,7 @@ def _get_kwargs( graph_id: str, *, capability: Union[None, Unset, str] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - params: dict[str, Any] = {} json_capability: Union[None, Unset, str] @@ -30,13 +24,6 @@ def _get_kwargs( json_capability = capability params["capability"] = json_capability - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -45,7 +32,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -88,8 +74,6 @@ def sync_detailed( *, client: AuthenticatedClient, capability: Union[None, Unset, str] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentListResponse, Any, HTTPValidationError]]: """List available agents @@ -104,11 +88,9 @@ def sync_detailed( Use the optional `capability` filter to find agents with specific capabilities. Args: - graph_id (str): Graph database identifier + graph_id (str): capability (Union[None, Unset, str]): Filter by capability (e.g., 'financial_analysis', 'rag_search') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -121,8 +103,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, capability=capability, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -137,8 +117,6 @@ def sync( *, client: AuthenticatedClient, capability: Union[None, Unset, str] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentListResponse, Any, HTTPValidationError]]: """List available agents @@ -153,11 +131,9 @@ def sync( Use the optional `capability` filter to find agents with specific capabilities. Args: - graph_id (str): Graph database identifier + graph_id (str): capability (Union[None, Unset, str]): Filter by capability (e.g., 'financial_analysis', 'rag_search') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -171,8 +147,6 @@ def sync( graph_id=graph_id, client=client, capability=capability, - token=token, - authorization=authorization, ).parsed @@ -181,8 +155,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, capability: Union[None, Unset, str] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentListResponse, Any, HTTPValidationError]]: """List available agents @@ -197,11 +169,9 @@ async def asyncio_detailed( Use the optional `capability` filter to find agents with specific capabilities. Args: - graph_id (str): Graph database identifier + graph_id (str): capability (Union[None, Unset, str]): Filter by capability (e.g., 'financial_analysis', 'rag_search') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -214,8 +184,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, capability=capability, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -228,8 +196,6 @@ async def asyncio( *, client: AuthenticatedClient, capability: Union[None, Unset, str] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentListResponse, Any, HTTPValidationError]]: """List available agents @@ -244,11 +210,9 @@ async def asyncio( Use the optional `capability` filter to find agents with specific capabilities. Args: - graph_id (str): Graph database identifier + graph_id (str): capability (Union[None, Unset, str]): Filter by capability (e.g., 'financial_analysis', 'rag_search') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -263,7 +227,5 @@ async def asyncio( graph_id=graph_id, client=client, capability=capability, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/agent/recommend_agent.py b/robosystems_client/api/agent/recommend_agent.py index 3e1b99b..79e26a9 100644 --- a/robosystems_client/api/agent/recommend_agent.py +++ b/robosystems_client/api/agent/recommend_agent.py @@ -8,35 +8,19 @@ from ...models.agent_recommendation_request import AgentRecommendationRequest from ...models.agent_recommendation_response import AgentRecommendationResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, *, body: AgentRecommendationRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/agent/recommend", - "params": params, } _kwargs["json"] = body.to_dict() @@ -86,8 +70,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: AgentRecommendationRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentRecommendationResponse, Any, HTTPValidationError]]: """Get agent recommendations @@ -107,9 +89,7 @@ def sync_detailed( Returns top agents ranked by confidence with explanations. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (AgentRecommendationRequest): Request for agent recommendations. Raises: @@ -123,8 +103,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -139,8 +117,6 @@ def sync( *, client: AuthenticatedClient, body: AgentRecommendationRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentRecommendationResponse, Any, HTTPValidationError]]: """Get agent recommendations @@ -160,9 +136,7 @@ def sync( Returns top agents ranked by confidence with explanations. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (AgentRecommendationRequest): Request for agent recommendations. Raises: @@ -177,8 +151,6 @@ def sync( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -187,8 +159,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: AgentRecommendationRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentRecommendationResponse, Any, HTTPValidationError]]: """Get agent recommendations @@ -208,9 +178,7 @@ async def asyncio_detailed( Returns top agents ranked by confidence with explanations. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (AgentRecommendationRequest): Request for agent recommendations. Raises: @@ -224,8 +192,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -238,8 +204,6 @@ async def asyncio( *, client: AuthenticatedClient, body: AgentRecommendationRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentRecommendationResponse, Any, HTTPValidationError]]: """Get agent recommendations @@ -259,9 +223,7 @@ async def asyncio( Returns top agents ranked by confidence with explanations. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (AgentRecommendationRequest): Request for agent recommendations. Raises: @@ -277,7 +239,5 @@ async def asyncio( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/auth/generate_sso_token.py b/robosystems_client/api/auth/generate_sso_token.py index 4ea201c..0a1325f 100644 --- a/robosystems_client/api/auth/generate_sso_token.py +++ b/robosystems_client/api/auth/generate_sso_token.py @@ -13,13 +13,8 @@ def _get_kwargs( *, - authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - cookies = {} if auth_token is not UNSET: cookies["auth-token"] = auth_token @@ -30,7 +25,6 @@ def _get_kwargs( "cookies": cookies, } - _kwargs["headers"] = headers return _kwargs @@ -72,7 +66,6 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SSOTokenResponse]]: """Generate SSO Token @@ -80,7 +73,6 @@ def sync_detailed( Generate a temporary SSO token for cross-app authentication. Args: - authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): Raises: @@ -92,7 +84,6 @@ def sync_detailed( """ kwargs = _get_kwargs( - authorization=authorization, auth_token=auth_token, ) @@ -106,7 +97,6 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SSOTokenResponse]]: """Generate SSO Token @@ -114,7 +104,6 @@ def sync( Generate a temporary SSO token for cross-app authentication. Args: - authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): Raises: @@ -127,7 +116,6 @@ def sync( return sync_detailed( client=client, - authorization=authorization, auth_token=auth_token, ).parsed @@ -135,7 +123,6 @@ def sync( async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SSOTokenResponse]]: """Generate SSO Token @@ -143,7 +130,6 @@ async def asyncio_detailed( Generate a temporary SSO token for cross-app authentication. Args: - authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): Raises: @@ -155,7 +141,6 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - authorization=authorization, auth_token=auth_token, ) @@ -167,7 +152,6 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SSOTokenResponse]]: """Generate SSO Token @@ -175,7 +159,6 @@ async def asyncio( Generate a temporary SSO token for cross-app authentication. Args: - authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): Raises: @@ -189,7 +172,6 @@ async def asyncio( return ( await asyncio_detailed( client=client, - authorization=authorization, auth_token=auth_token, ) ).parsed diff --git a/robosystems_client/api/auth/get_current_auth_user.py b/robosystems_client/api/auth/get_current_auth_user.py index 1108307..d210cd8 100644 --- a/robosystems_client/api/auth/get_current_auth_user.py +++ b/robosystems_client/api/auth/get_current_auth_user.py @@ -9,34 +9,21 @@ from ...models.get_current_auth_user_response_getcurrentauthuser import ( GetCurrentAuthUserResponseGetcurrentauthuser, ) -from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response -def _get_kwargs( - *, - authorization: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/auth/me", } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[ - Union[ - ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser, HTTPValidationError - ] -]: +) -> Optional[Union[ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser]]: if response.status_code == 200: response_200 = GetCurrentAuthUserResponseGetcurrentauthuser.from_dict( response.json() @@ -49,11 +36,6 @@ def _parse_response( return response_401 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -62,11 +44,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[ - Union[ - ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser, HTTPValidationError - ] -]: +) -> Response[Union[ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,30 +56,20 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, -) -> Response[ - Union[ - ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser, HTTPValidationError - ] -]: +) -> Response[Union[ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser]]: """Get Current User Get the currently authenticated user. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser, HTTPValidationError]] + Response[Union[ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser]] """ - kwargs = _get_kwargs( - authorization=authorization, - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -113,60 +81,41 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[ - Union[ - ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser, HTTPValidationError - ] -]: +) -> Optional[Union[ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser]]: """Get Current User Get the currently authenticated user. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser, HTTPValidationError] + Union[ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser] """ return sync_detailed( client=client, - authorization=authorization, ).parsed async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, -) -> Response[ - Union[ - ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser, HTTPValidationError - ] -]: +) -> Response[Union[ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser]]: """Get Current User Get the currently authenticated user. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser, HTTPValidationError]] + Response[Union[ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser]] """ - kwargs = _get_kwargs( - authorization=authorization, - ) + kwargs = _get_kwargs() response = await client.get_async_httpx_client().request(**kwargs) @@ -176,30 +125,21 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[ - Union[ - ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser, HTTPValidationError - ] -]: +) -> Optional[Union[ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser]]: """Get Current User Get the currently authenticated user. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser, HTTPValidationError] + Union[ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser] """ return ( await asyncio_detailed( client=client, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/auth/logout_user.py b/robosystems_client/api/auth/logout_user.py index dd8ffc8..ee6a5de 100644 --- a/robosystems_client/api/auth/logout_user.py +++ b/robosystems_client/api/auth/logout_user.py @@ -5,41 +5,27 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.http_validation_error import HTTPValidationError from ...models.logout_user_response_logoutuser import LogoutUserResponseLogoutuser -from ...types import UNSET, Response, Unset +from ...types import Response -def _get_kwargs( - *, - authorization: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/auth/logout", } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[HTTPValidationError, LogoutUserResponseLogoutuser]]: +) -> Optional[LogoutUserResponseLogoutuser]: if response.status_code == 200: response_200 = LogoutUserResponseLogoutuser.from_dict(response.json()) return response_200 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -48,7 +34,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[HTTPValidationError, LogoutUserResponseLogoutuser]]: +) -> Response[LogoutUserResponseLogoutuser]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,26 +46,20 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[HTTPValidationError, LogoutUserResponseLogoutuser]]: +) -> Response[LogoutUserResponseLogoutuser]: """User Logout Logout user and invalidate session. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[HTTPValidationError, LogoutUserResponseLogoutuser]] + Response[LogoutUserResponseLogoutuser] """ - kwargs = _get_kwargs( - authorization=authorization, - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -91,52 +71,41 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[HTTPValidationError, LogoutUserResponseLogoutuser]]: +) -> Optional[LogoutUserResponseLogoutuser]: """User Logout Logout user and invalidate session. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[HTTPValidationError, LogoutUserResponseLogoutuser] + LogoutUserResponseLogoutuser """ return sync_detailed( client=client, - authorization=authorization, ).parsed async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[HTTPValidationError, LogoutUserResponseLogoutuser]]: +) -> Response[LogoutUserResponseLogoutuser]: """User Logout Logout user and invalidate session. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[HTTPValidationError, LogoutUserResponseLogoutuser]] + Response[LogoutUserResponseLogoutuser] """ - kwargs = _get_kwargs( - authorization=authorization, - ) + kwargs = _get_kwargs() response = await client.get_async_httpx_client().request(**kwargs) @@ -146,26 +115,21 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[HTTPValidationError, LogoutUserResponseLogoutuser]]: +) -> Optional[LogoutUserResponseLogoutuser]: """User Logout Logout user and invalidate session. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[HTTPValidationError, LogoutUserResponseLogoutuser] + LogoutUserResponseLogoutuser """ return ( await asyncio_detailed( client=client, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/auth/refresh_auth_session.py b/robosystems_client/api/auth/refresh_auth_session.py index d552b0e..09bc4cd 100644 --- a/robosystems_client/api/auth/refresh_auth_session.py +++ b/robosystems_client/api/auth/refresh_auth_session.py @@ -7,30 +7,21 @@ from ...client import AuthenticatedClient, Client from ...models.auth_response import AuthResponse from ...models.error_response import ErrorResponse -from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response -def _get_kwargs( - *, - authorization: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/auth/refresh", } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AuthResponse, ErrorResponse, HTTPValidationError]]: +) -> Optional[Union[AuthResponse, ErrorResponse]]: if response.status_code == 200: response_200 = AuthResponse.from_dict(response.json()) @@ -41,11 +32,6 @@ def _parse_response( return response_401 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -54,7 +40,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]: +) -> Response[Union[AuthResponse, ErrorResponse]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,26 +52,20 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]: +) -> Response[Union[AuthResponse, ErrorResponse]]: """Refresh Session Refresh authentication session with a new JWT token. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]] + Response[Union[AuthResponse, ErrorResponse]] """ - kwargs = _get_kwargs( - authorization=authorization, - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -97,52 +77,41 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[AuthResponse, ErrorResponse, HTTPValidationError]]: +) -> Optional[Union[AuthResponse, ErrorResponse]]: """Refresh Session Refresh authentication session with a new JWT token. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AuthResponse, ErrorResponse, HTTPValidationError] + Union[AuthResponse, ErrorResponse] """ return sync_detailed( client=client, - authorization=authorization, ).parsed async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]: +) -> Response[Union[AuthResponse, ErrorResponse]]: """Refresh Session Refresh authentication session with a new JWT token. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]] + Response[Union[AuthResponse, ErrorResponse]] """ - kwargs = _get_kwargs( - authorization=authorization, - ) + kwargs = _get_kwargs() response = await client.get_async_httpx_client().request(**kwargs) @@ -152,26 +121,21 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[AuthResponse, ErrorResponse, HTTPValidationError]]: +) -> Optional[Union[AuthResponse, ErrorResponse]]: """Refresh Session Refresh authentication session with a new JWT token. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AuthResponse, ErrorResponse, HTTPValidationError] + Union[AuthResponse, ErrorResponse] """ return ( await asyncio_detailed( client=client, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/auth/resend_verification_email.py b/robosystems_client/api/auth/resend_verification_email.py index c868610..5f3d199 100644 --- a/robosystems_client/api/auth/resend_verification_email.py +++ b/robosystems_client/api/auth/resend_verification_email.py @@ -6,38 +6,25 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.error_response import ErrorResponse -from ...models.http_validation_error import HTTPValidationError from ...models.resend_verification_email_response_resendverificationemail import ( ResendVerificationEmailResponseResendverificationemail, ) -from ...types import UNSET, Response, Unset +from ...types import Response -def _get_kwargs( - *, - authorization: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/auth/email/resend", } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response ) -> Optional[ - Union[ - ErrorResponse, - HTTPValidationError, - ResendVerificationEmailResponseResendverificationemail, - ] + Union[ErrorResponse, ResendVerificationEmailResponseResendverificationemail] ]: if response.status_code == 200: response_200 = ResendVerificationEmailResponseResendverificationemail.from_dict( @@ -51,11 +38,6 @@ def _parse_response( return response_400 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if response.status_code == 429: response_429 = ErrorResponse.from_dict(response.json()) @@ -75,11 +57,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response ) -> Response[ - Union[ - ErrorResponse, - HTTPValidationError, - ResendVerificationEmailResponseResendverificationemail, - ] + Union[ErrorResponse, ResendVerificationEmailResponseResendverificationemail] ]: return Response( status_code=HTTPStatus(response.status_code), @@ -92,32 +70,22 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ - Union[ - ErrorResponse, - HTTPValidationError, - ResendVerificationEmailResponseResendverificationemail, - ] + Union[ErrorResponse, ResendVerificationEmailResponseResendverificationemail] ]: """Resend Email Verification Resend verification email to the authenticated user. Rate limited to 3 per hour. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorResponse, HTTPValidationError, ResendVerificationEmailResponseResendverificationemail]] + Response[Union[ErrorResponse, ResendVerificationEmailResponseResendverificationemail]] """ - kwargs = _get_kwargs( - authorization=authorization, - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -129,64 +97,45 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ - Union[ - ErrorResponse, - HTTPValidationError, - ResendVerificationEmailResponseResendverificationemail, - ] + Union[ErrorResponse, ResendVerificationEmailResponseResendverificationemail] ]: """Resend Email Verification Resend verification email to the authenticated user. Rate limited to 3 per hour. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorResponse, HTTPValidationError, ResendVerificationEmailResponseResendverificationemail] + Union[ErrorResponse, ResendVerificationEmailResponseResendverificationemail] """ return sync_detailed( client=client, - authorization=authorization, ).parsed async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ - Union[ - ErrorResponse, - HTTPValidationError, - ResendVerificationEmailResponseResendverificationemail, - ] + Union[ErrorResponse, ResendVerificationEmailResponseResendverificationemail] ]: """Resend Email Verification Resend verification email to the authenticated user. Rate limited to 3 per hour. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorResponse, HTTPValidationError, ResendVerificationEmailResponseResendverificationemail]] + Response[Union[ErrorResponse, ResendVerificationEmailResponseResendverificationemail]] """ - kwargs = _get_kwargs( - authorization=authorization, - ) + kwargs = _get_kwargs() response = await client.get_async_httpx_client().request(**kwargs) @@ -196,32 +145,23 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ - Union[ - ErrorResponse, - HTTPValidationError, - ResendVerificationEmailResponseResendverificationemail, - ] + Union[ErrorResponse, ResendVerificationEmailResponseResendverificationemail] ]: """Resend Email Verification Resend verification email to the authenticated user. Rate limited to 3 per hour. - Args: - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorResponse, HTTPValidationError, ResendVerificationEmailResponseResendverificationemail] + Union[ErrorResponse, ResendVerificationEmailResponseResendverificationemail] """ return ( await asyncio_detailed( client=client, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/backup/create_backup.py b/robosystems_client/api/backup/create_backup.py index 0beadcd..54844b7 100644 --- a/robosystems_client/api/backup/create_backup.py +++ b/robosystems_client/api/backup/create_backup.py @@ -8,35 +8,19 @@ from ...models.backup_create_request import BackupCreateRequest from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, *, body: BackupCreateRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/backups", - "params": params, } _kwargs["json"] = body.to_dict() @@ -101,8 +85,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: BackupCreateRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Backup @@ -150,9 +132,7 @@ def sync_detailed( Returns operation details for SSE monitoring. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (BackupCreateRequest): Request model for creating a backup. Raises: @@ -166,8 +146,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -182,8 +160,6 @@ def sync( *, client: AuthenticatedClient, body: BackupCreateRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Backup @@ -231,9 +207,7 @@ def sync( Returns operation details for SSE monitoring. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (BackupCreateRequest): Request model for creating a backup. Raises: @@ -248,8 +222,6 @@ def sync( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -258,8 +230,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: BackupCreateRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Backup @@ -307,9 +277,7 @@ async def asyncio_detailed( Returns operation details for SSE monitoring. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (BackupCreateRequest): Request model for creating a backup. Raises: @@ -323,8 +291,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -337,8 +303,6 @@ async def asyncio( *, client: AuthenticatedClient, body: BackupCreateRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Backup @@ -386,9 +350,7 @@ async def asyncio( Returns operation details for SSE monitoring. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (BackupCreateRequest): Request model for creating a backup. Raises: @@ -404,7 +366,5 @@ async def asyncio( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/backup/get_backup_download_url.py b/robosystems_client/api/backup/get_backup_download_url.py index 1a9806b..f084b42 100644 --- a/robosystems_client/api/backup/get_backup_download_url.py +++ b/robosystems_client/api/backup/get_backup_download_url.py @@ -17,24 +17,11 @@ def _get_kwargs( backup_id: str, *, expires_in: Union[Unset, int] = 3600, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - params: dict[str, Any] = {} params["expires_in"] = expires_in - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -43,7 +30,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -101,8 +87,6 @@ def sync_detailed( *, client: AuthenticatedClient, expires_in: Union[Unset, int] = 3600, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[Any, GetBackupDownloadUrlResponseGetbackupdownloadurl, HTTPValidationError] ]: @@ -111,11 +95,9 @@ def sync_detailed( Generate a temporary download URL for a backup (unencrypted, compressed .kuzu files only) Args: - graph_id (str): Graph database identifier + graph_id (str): backup_id (str): Backup identifier expires_in (Union[Unset, int]): URL expiration time in seconds Default: 3600. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -129,8 +111,6 @@ def sync_detailed( graph_id=graph_id, backup_id=backup_id, expires_in=expires_in, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -146,8 +126,6 @@ def sync( *, client: AuthenticatedClient, expires_in: Union[Unset, int] = 3600, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[Any, GetBackupDownloadUrlResponseGetbackupdownloadurl, HTTPValidationError] ]: @@ -156,11 +134,9 @@ def sync( Generate a temporary download URL for a backup (unencrypted, compressed .kuzu files only) Args: - graph_id (str): Graph database identifier + graph_id (str): backup_id (str): Backup identifier expires_in (Union[Unset, int]): URL expiration time in seconds Default: 3600. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -175,8 +151,6 @@ def sync( backup_id=backup_id, client=client, expires_in=expires_in, - token=token, - authorization=authorization, ).parsed @@ -186,8 +160,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, expires_in: Union[Unset, int] = 3600, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[Any, GetBackupDownloadUrlResponseGetbackupdownloadurl, HTTPValidationError] ]: @@ -196,11 +168,9 @@ async def asyncio_detailed( Generate a temporary download URL for a backup (unencrypted, compressed .kuzu files only) Args: - graph_id (str): Graph database identifier + graph_id (str): backup_id (str): Backup identifier expires_in (Union[Unset, int]): URL expiration time in seconds Default: 3600. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -214,8 +184,6 @@ async def asyncio_detailed( graph_id=graph_id, backup_id=backup_id, expires_in=expires_in, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -229,8 +197,6 @@ async def asyncio( *, client: AuthenticatedClient, expires_in: Union[Unset, int] = 3600, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[Any, GetBackupDownloadUrlResponseGetbackupdownloadurl, HTTPValidationError] ]: @@ -239,11 +205,9 @@ async def asyncio( Generate a temporary download URL for a backup (unencrypted, compressed .kuzu files only) Args: - graph_id (str): Graph database identifier + graph_id (str): backup_id (str): Backup identifier expires_in (Union[Unset, int]): URL expiration time in seconds Default: 3600. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -259,7 +223,5 @@ async def asyncio( backup_id=backup_id, client=client, expires_in=expires_in, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/backup/get_backup_stats.py b/robosystems_client/api/backup/get_backup_stats.py index 638f803..1d527bd 100644 --- a/robosystems_client/api/backup/get_backup_stats.py +++ b/robosystems_client/api/backup/get_backup_stats.py @@ -7,37 +7,17 @@ from ...client import AuthenticatedClient, Client from ...models.backup_stats_response import BackupStatsResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/backups/stats", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -75,17 +55,13 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[BackupStatsResponse, HTTPValidationError]]: """Get backup statistics Get comprehensive backup statistics for the specified graph database Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -97,8 +73,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -112,17 +86,13 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[BackupStatsResponse, HTTPValidationError]]: """Get backup statistics Get comprehensive backup statistics for the specified graph database Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,8 +105,6 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -144,17 +112,13 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[BackupStatsResponse, HTTPValidationError]]: """Get backup statistics Get comprehensive backup statistics for the specified graph database Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -166,8 +130,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -179,17 +141,13 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[BackupStatsResponse, HTTPValidationError]]: """Get backup statistics Get comprehensive backup statistics for the specified graph database Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -203,7 +161,5 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/backup/list_backups.py b/robosystems_client/api/backup/list_backups.py index c1f9529..ad53cfd 100644 --- a/robosystems_client/api/backup/list_backups.py +++ b/robosystems_client/api/backup/list_backups.py @@ -15,26 +15,13 @@ def _get_kwargs( *, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - params: dict[str, Any] = {} params["limit"] = limit params["offset"] = offset - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -43,7 +30,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -83,19 +69,15 @@ def sync_detailed( client: AuthenticatedClient, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[BackupListResponse, HTTPValidationError]]: """List graph database backups List all backups for the specified graph database Args: - graph_id (str): Graph database identifier + graph_id (str): limit (Union[Unset, int]): Maximum number of backups to return Default: 50. offset (Union[Unset, int]): Number of backups to skip Default: 0. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -109,8 +91,6 @@ def sync_detailed( graph_id=graph_id, limit=limit, offset=offset, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -126,19 +106,15 @@ def sync( client: AuthenticatedClient, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[BackupListResponse, HTTPValidationError]]: """List graph database backups List all backups for the specified graph database Args: - graph_id (str): Graph database identifier + graph_id (str): limit (Union[Unset, int]): Maximum number of backups to return Default: 50. offset (Union[Unset, int]): Number of backups to skip Default: 0. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -153,8 +129,6 @@ def sync( client=client, limit=limit, offset=offset, - token=token, - authorization=authorization, ).parsed @@ -164,19 +138,15 @@ async def asyncio_detailed( client: AuthenticatedClient, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[BackupListResponse, HTTPValidationError]]: """List graph database backups List all backups for the specified graph database Args: - graph_id (str): Graph database identifier + graph_id (str): limit (Union[Unset, int]): Maximum number of backups to return Default: 50. offset (Union[Unset, int]): Number of backups to skip Default: 0. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -190,8 +160,6 @@ async def asyncio_detailed( graph_id=graph_id, limit=limit, offset=offset, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -205,19 +173,15 @@ async def asyncio( client: AuthenticatedClient, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[BackupListResponse, HTTPValidationError]]: """List graph database backups List all backups for the specified graph database Args: - graph_id (str): Graph database identifier + graph_id (str): limit (Union[Unset, int]): Maximum number of backups to return Default: 50. offset (Union[Unset, int]): Number of backups to skip Default: 0. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -233,7 +197,5 @@ async def asyncio( client=client, limit=limit, offset=offset, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/backup/restore_backup.py b/robosystems_client/api/backup/restore_backup.py index a41590d..bd38adc 100644 --- a/robosystems_client/api/backup/restore_backup.py +++ b/robosystems_client/api/backup/restore_backup.py @@ -8,7 +8,7 @@ from ...models.backup_restore_request import BackupRestoreRequest from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( @@ -16,28 +16,12 @@ def _get_kwargs( backup_id: str, *, body: BackupRestoreRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/backups/{backup_id}/restore", - "params": params, } _kwargs["json"] = body.to_dict() @@ -103,8 +87,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: BackupRestoreRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Restore Encrypted Backup @@ -152,10 +134,8 @@ def sync_detailed( Returns operation details for SSE monitoring. Args: - graph_id (str): Graph database identifier + graph_id (str): backup_id (str): Backup identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (BackupRestoreRequest): Request model for restoring from a backup. Raises: @@ -170,8 +150,6 @@ def sync_detailed( graph_id=graph_id, backup_id=backup_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -187,8 +165,6 @@ def sync( *, client: AuthenticatedClient, body: BackupRestoreRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Restore Encrypted Backup @@ -236,10 +212,8 @@ def sync( Returns operation details for SSE monitoring. Args: - graph_id (str): Graph database identifier + graph_id (str): backup_id (str): Backup identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (BackupRestoreRequest): Request model for restoring from a backup. Raises: @@ -255,8 +229,6 @@ def sync( backup_id=backup_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -266,8 +238,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: BackupRestoreRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Restore Encrypted Backup @@ -315,10 +285,8 @@ async def asyncio_detailed( Returns operation details for SSE monitoring. Args: - graph_id (str): Graph database identifier + graph_id (str): backup_id (str): Backup identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (BackupRestoreRequest): Request model for restoring from a backup. Raises: @@ -333,8 +301,6 @@ async def asyncio_detailed( graph_id=graph_id, backup_id=backup_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -348,8 +314,6 @@ async def asyncio( *, client: AuthenticatedClient, body: BackupRestoreRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Restore Encrypted Backup @@ -397,10 +361,8 @@ async def asyncio( Returns operation details for SSE monitoring. Args: - graph_id (str): Graph database identifier + graph_id (str): backup_id (str): Backup identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (BackupRestoreRequest): Request model for restoring from a backup. Raises: @@ -417,7 +379,5 @@ async def asyncio( backup_id=backup_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/create_connection.py b/robosystems_client/api/connections/create_connection.py index 188efc8..64b4709 100644 --- a/robosystems_client/api/connections/create_connection.py +++ b/robosystems_client/api/connections/create_connection.py @@ -9,35 +9,19 @@ from ...models.create_connection_request import CreateConnectionRequest from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, *, body: CreateConnectionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/connections", - "params": params, } _kwargs["json"] = body.to_dict() @@ -103,8 +87,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: CreateConnectionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Create Connection @@ -131,9 +113,7 @@ def sync_detailed( This operation is included - no credit consumption required. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (CreateConnectionRequest): Request to create a new connection. Raises: @@ -147,8 +127,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -163,8 +141,6 @@ def sync( *, client: AuthenticatedClient, body: CreateConnectionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Create Connection @@ -191,9 +167,7 @@ def sync( This operation is included - no credit consumption required. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (CreateConnectionRequest): Request to create a new connection. Raises: @@ -208,8 +182,6 @@ def sync( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -218,8 +190,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: CreateConnectionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Create Connection @@ -246,9 +216,7 @@ async def asyncio_detailed( This operation is included - no credit consumption required. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (CreateConnectionRequest): Request to create a new connection. Raises: @@ -262,8 +230,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -276,8 +242,6 @@ async def asyncio( *, client: AuthenticatedClient, body: CreateConnectionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Create Connection @@ -304,9 +268,7 @@ async def asyncio( This operation is included - no credit consumption required. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (CreateConnectionRequest): Request to create a new connection. Raises: @@ -322,7 +284,5 @@ async def asyncio( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/create_link_token.py b/robosystems_client/api/connections/create_link_token.py index 7fa2457..c3936ae 100644 --- a/robosystems_client/api/connections/create_link_token.py +++ b/robosystems_client/api/connections/create_link_token.py @@ -8,35 +8,19 @@ from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError from ...models.link_token_request import LinkTokenRequest -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, *, body: LinkTokenRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/connections/link/token", - "params": params, } _kwargs["json"] = body.to_dict() @@ -96,8 +80,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: LinkTokenRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Link Token @@ -117,9 +99,7 @@ def sync_detailed( No credits are consumed for creating link tokens. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (LinkTokenRequest): Request to create a link token for embedded authentication. Raises: @@ -133,8 +113,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -149,8 +127,6 @@ def sync( *, client: AuthenticatedClient, body: LinkTokenRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Link Token @@ -170,9 +146,7 @@ def sync( No credits are consumed for creating link tokens. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (LinkTokenRequest): Request to create a link token for embedded authentication. Raises: @@ -187,8 +161,6 @@ def sync( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -197,8 +169,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: LinkTokenRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Link Token @@ -218,9 +188,7 @@ async def asyncio_detailed( No credits are consumed for creating link tokens. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (LinkTokenRequest): Request to create a link token for embedded authentication. Raises: @@ -234,8 +202,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -248,8 +214,6 @@ async def asyncio( *, client: AuthenticatedClient, body: LinkTokenRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Link Token @@ -269,9 +233,7 @@ async def asyncio( No credits are consumed for creating link tokens. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (LinkTokenRequest): Request to create a link token for embedded authentication. Raises: @@ -287,7 +249,5 @@ async def asyncio( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/delete_connection.py b/robosystems_client/api/connections/delete_connection.py index 51445a6..9209083 100644 --- a/robosystems_client/api/connections/delete_connection.py +++ b/robosystems_client/api/connections/delete_connection.py @@ -8,38 +8,18 @@ from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError from ...models.success_response import SuccessResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, connection_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "delete", "url": f"/v1/graphs/{graph_id}/connections/{connection_id}", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -93,8 +73,6 @@ def sync_detailed( connection_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Delete Connection @@ -112,10 +90,8 @@ def sync_detailed( Only users with admin role can delete connections. Args: - graph_id (str): Graph database identifier + graph_id (str): connection_id (str): Connection identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -128,8 +104,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, connection_id=connection_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -144,8 +118,6 @@ def sync( connection_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Delete Connection @@ -163,10 +135,8 @@ def sync( Only users with admin role can delete connections. Args: - graph_id (str): Graph database identifier + graph_id (str): connection_id (str): Connection identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -180,8 +150,6 @@ def sync( graph_id=graph_id, connection_id=connection_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -190,8 +158,6 @@ async def asyncio_detailed( connection_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Delete Connection @@ -209,10 +175,8 @@ async def asyncio_detailed( Only users with admin role can delete connections. Args: - graph_id (str): Graph database identifier + graph_id (str): connection_id (str): Connection identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -225,8 +189,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, connection_id=connection_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -239,8 +201,6 @@ async def asyncio( connection_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Delete Connection @@ -258,10 +218,8 @@ async def asyncio( Only users with admin role can delete connections. Args: - graph_id (str): Graph database identifier + graph_id (str): connection_id (str): Connection identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -276,7 +234,5 @@ async def asyncio( graph_id=graph_id, connection_id=connection_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/exchange_link_token.py b/robosystems_client/api/connections/exchange_link_token.py index efb4d37..df3f0a9 100644 --- a/robosystems_client/api/connections/exchange_link_token.py +++ b/robosystems_client/api/connections/exchange_link_token.py @@ -8,35 +8,19 @@ from ...models.error_response import ErrorResponse from ...models.exchange_token_request import ExchangeTokenRequest from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, *, body: ExchangeTokenRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/connections/link/exchange", - "params": params, } _kwargs["json"] = body.to_dict() @@ -96,8 +80,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: ExchangeTokenRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Exchange Link Token @@ -122,9 +104,7 @@ def sync_detailed( No credits are consumed for token exchange. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (ExchangeTokenRequest): Exchange temporary token for permanent credentials. Raises: @@ -138,8 +118,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -154,8 +132,6 @@ def sync( *, client: AuthenticatedClient, body: ExchangeTokenRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Exchange Link Token @@ -180,9 +156,7 @@ def sync( No credits are consumed for token exchange. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (ExchangeTokenRequest): Exchange temporary token for permanent credentials. Raises: @@ -197,8 +171,6 @@ def sync( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -207,8 +179,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ExchangeTokenRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Exchange Link Token @@ -233,9 +203,7 @@ async def asyncio_detailed( No credits are consumed for token exchange. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (ExchangeTokenRequest): Exchange temporary token for permanent credentials. Raises: @@ -249,8 +217,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -263,8 +229,6 @@ async def asyncio( *, client: AuthenticatedClient, body: ExchangeTokenRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Exchange Link Token @@ -289,9 +253,7 @@ async def asyncio( No credits are consumed for token exchange. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (ExchangeTokenRequest): Exchange temporary token for permanent credentials. Raises: @@ -307,7 +269,5 @@ async def asyncio( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/get_connection.py b/robosystems_client/api/connections/get_connection.py index 0c1b9f1..fb5dd1d 100644 --- a/robosystems_client/api/connections/get_connection.py +++ b/robosystems_client/api/connections/get_connection.py @@ -8,38 +8,18 @@ from ...models.connection_response import ConnectionResponse from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, connection_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/connections/{connection_id}", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -93,8 +73,6 @@ def sync_detailed( connection_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Get Connection @@ -110,10 +88,8 @@ def sync_detailed( No credits are consumed for viewing connection details. Args: - graph_id (str): Graph database identifier + graph_id (str): connection_id (str): Unique connection identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -126,8 +102,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, connection_id=connection_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -142,8 +116,6 @@ def sync( connection_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Get Connection @@ -159,10 +131,8 @@ def sync( No credits are consumed for viewing connection details. Args: - graph_id (str): Graph database identifier + graph_id (str): connection_id (str): Unique connection identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -176,8 +146,6 @@ def sync( graph_id=graph_id, connection_id=connection_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -186,8 +154,6 @@ async def asyncio_detailed( connection_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Get Connection @@ -203,10 +169,8 @@ async def asyncio_detailed( No credits are consumed for viewing connection details. Args: - graph_id (str): Graph database identifier + graph_id (str): connection_id (str): Unique connection identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -219,8 +183,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, connection_id=connection_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -233,8 +195,6 @@ async def asyncio( connection_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Get Connection @@ -250,10 +210,8 @@ async def asyncio( No credits are consumed for viewing connection details. Args: - graph_id (str): Graph database identifier + graph_id (str): connection_id (str): Unique connection identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -268,7 +226,5 @@ async def asyncio( graph_id=graph_id, connection_id=connection_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/get_connection_options.py b/robosystems_client/api/connections/get_connection_options.py index 1e53f0e..a92a8fe 100644 --- a/robosystems_client/api/connections/get_connection_options.py +++ b/robosystems_client/api/connections/get_connection_options.py @@ -8,37 +8,17 @@ from ...models.connection_options_response import ConnectionOptionsResponse from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/connections/options", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -86,8 +66,6 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ConnectionOptionsResponse, ErrorResponse, HTTPValidationError]]: """List Connection Options @@ -113,9 +91,7 @@ def sync_detailed( No credits are consumed for viewing connection options. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -127,8 +103,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -142,8 +116,6 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ConnectionOptionsResponse, ErrorResponse, HTTPValidationError]]: """List Connection Options @@ -169,9 +141,7 @@ def sync( No credits are consumed for viewing connection options. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -184,8 +154,6 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -193,8 +161,6 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ConnectionOptionsResponse, ErrorResponse, HTTPValidationError]]: """List Connection Options @@ -220,9 +186,7 @@ async def asyncio_detailed( No credits are consumed for viewing connection options. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -234,8 +198,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -247,8 +209,6 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ConnectionOptionsResponse, ErrorResponse, HTTPValidationError]]: """List Connection Options @@ -274,9 +234,7 @@ async def asyncio( No credits are consumed for viewing connection options. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -290,7 +248,5 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/init_o_auth.py b/robosystems_client/api/connections/init_o_auth.py index 04f1c71..108f88c 100644 --- a/robosystems_client/api/connections/init_o_auth.py +++ b/robosystems_client/api/connections/init_o_auth.py @@ -8,35 +8,19 @@ from ...models.http_validation_error import HTTPValidationError from ...models.o_auth_init_request import OAuthInitRequest from ...models.o_auth_init_response import OAuthInitResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, *, body: OAuthInitRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/connections/oauth/init", - "params": params, } _kwargs["json"] = body.to_dict() @@ -82,8 +66,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: OAuthInitRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, OAuthInitResponse]]: """Init Oauth @@ -93,9 +75,7 @@ def sync_detailed( Currently supports: QuickBooks Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (OAuthInitRequest): Request to initiate OAuth flow. Raises: @@ -109,8 +89,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -125,8 +103,6 @@ def sync( *, client: AuthenticatedClient, body: OAuthInitRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, OAuthInitResponse]]: """Init Oauth @@ -136,9 +112,7 @@ def sync( Currently supports: QuickBooks Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (OAuthInitRequest): Request to initiate OAuth flow. Raises: @@ -153,8 +127,6 @@ def sync( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -163,8 +135,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: OAuthInitRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, OAuthInitResponse]]: """Init Oauth @@ -174,9 +144,7 @@ async def asyncio_detailed( Currently supports: QuickBooks Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (OAuthInitRequest): Request to initiate OAuth flow. Raises: @@ -190,8 +158,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -204,8 +170,6 @@ async def asyncio( *, client: AuthenticatedClient, body: OAuthInitRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, OAuthInitResponse]]: """Init Oauth @@ -215,9 +179,7 @@ async def asyncio( Currently supports: QuickBooks Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (OAuthInitRequest): Request to initiate OAuth flow. Raises: @@ -233,7 +195,5 @@ async def asyncio( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/list_connections.py b/robosystems_client/api/connections/list_connections.py index 47a6470..e690c9d 100644 --- a/robosystems_client/api/connections/list_connections.py +++ b/robosystems_client/api/connections/list_connections.py @@ -17,13 +17,7 @@ def _get_kwargs( *, entity_id: Union[None, Unset, str] = UNSET, provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - params: dict[str, Any] = {} json_entity_id: Union[None, Unset, str] @@ -42,13 +36,6 @@ def _get_kwargs( json_provider = provider params["provider"] = json_provider - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -57,7 +44,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -112,8 +98,6 @@ def sync_detailed( client: AuthenticatedClient, entity_id: Union[None, Unset, str] = UNSET, provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, list["ConnectionResponse"]]]: """List Connections @@ -133,11 +117,9 @@ def sync_detailed( No credits are consumed for listing connections. Args: - graph_id (str): Graph database identifier + graph_id (str): entity_id (Union[None, Unset, str]): Filter by entity ID provider (Union[ListConnectionsProviderType0, None, Unset]): Filter by provider type - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -151,8 +133,6 @@ def sync_detailed( graph_id=graph_id, entity_id=entity_id, provider=provider, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -168,8 +148,6 @@ def sync( client: AuthenticatedClient, entity_id: Union[None, Unset, str] = UNSET, provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, list["ConnectionResponse"]]]: """List Connections @@ -189,11 +167,9 @@ def sync( No credits are consumed for listing connections. Args: - graph_id (str): Graph database identifier + graph_id (str): entity_id (Union[None, Unset, str]): Filter by entity ID provider (Union[ListConnectionsProviderType0, None, Unset]): Filter by provider type - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -208,8 +184,6 @@ def sync( client=client, entity_id=entity_id, provider=provider, - token=token, - authorization=authorization, ).parsed @@ -219,8 +193,6 @@ async def asyncio_detailed( client: AuthenticatedClient, entity_id: Union[None, Unset, str] = UNSET, provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, list["ConnectionResponse"]]]: """List Connections @@ -240,11 +212,9 @@ async def asyncio_detailed( No credits are consumed for listing connections. Args: - graph_id (str): Graph database identifier + graph_id (str): entity_id (Union[None, Unset, str]): Filter by entity ID provider (Union[ListConnectionsProviderType0, None, Unset]): Filter by provider type - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -258,8 +228,6 @@ async def asyncio_detailed( graph_id=graph_id, entity_id=entity_id, provider=provider, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -273,8 +241,6 @@ async def asyncio( client: AuthenticatedClient, entity_id: Union[None, Unset, str] = UNSET, provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, list["ConnectionResponse"]]]: """List Connections @@ -294,11 +260,9 @@ async def asyncio( No credits are consumed for listing connections. Args: - graph_id (str): Graph database identifier + graph_id (str): entity_id (Union[None, Unset, str]): Filter by entity ID provider (Union[ListConnectionsProviderType0, None, Unset]): Filter by provider type - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -314,7 +278,5 @@ async def asyncio( client=client, entity_id=entity_id, provider=provider, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/oauth_callback.py b/robosystems_client/api/connections/oauth_callback.py index d68b93f..e8361e8 100644 --- a/robosystems_client/api/connections/oauth_callback.py +++ b/robosystems_client/api/connections/oauth_callback.py @@ -8,7 +8,7 @@ from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError from ...models.o_auth_callback_request import OAuthCallbackRequest -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( @@ -16,28 +16,12 @@ def _get_kwargs( provider: str, *, body: OAuthCallbackRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/connections/oauth/callback/{provider}", - "params": params, } _kwargs["json"] = body.to_dict() @@ -103,8 +87,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: OAuthCallbackRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """OAuth Callback @@ -129,10 +111,8 @@ def sync_detailed( No credits are consumed for OAuth callbacks. Args: - graph_id (str): Graph database identifier + graph_id (str): provider (str): OAuth provider name - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (OAuthCallbackRequest): OAuth callback parameters. Raises: @@ -147,8 +127,6 @@ def sync_detailed( graph_id=graph_id, provider=provider, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -164,8 +142,6 @@ def sync( *, client: AuthenticatedClient, body: OAuthCallbackRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """OAuth Callback @@ -190,10 +166,8 @@ def sync( No credits are consumed for OAuth callbacks. Args: - graph_id (str): Graph database identifier + graph_id (str): provider (str): OAuth provider name - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (OAuthCallbackRequest): OAuth callback parameters. Raises: @@ -209,8 +183,6 @@ def sync( provider=provider, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -220,8 +192,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: OAuthCallbackRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """OAuth Callback @@ -246,10 +216,8 @@ async def asyncio_detailed( No credits are consumed for OAuth callbacks. Args: - graph_id (str): Graph database identifier + graph_id (str): provider (str): OAuth provider name - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (OAuthCallbackRequest): OAuth callback parameters. Raises: @@ -264,8 +232,6 @@ async def asyncio_detailed( graph_id=graph_id, provider=provider, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -279,8 +245,6 @@ async def asyncio( *, client: AuthenticatedClient, body: OAuthCallbackRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """OAuth Callback @@ -305,10 +269,8 @@ async def asyncio( No credits are consumed for OAuth callbacks. Args: - graph_id (str): Graph database identifier + graph_id (str): provider (str): OAuth provider name - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (OAuthCallbackRequest): OAuth callback parameters. Raises: @@ -325,7 +287,5 @@ async def asyncio( provider=provider, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/sync_connection.py b/robosystems_client/api/connections/sync_connection.py index 5591945..3b800e4 100644 --- a/robosystems_client/api/connections/sync_connection.py +++ b/robosystems_client/api/connections/sync_connection.py @@ -11,7 +11,7 @@ from ...models.sync_connection_response_syncconnection import ( SyncConnectionResponseSyncconnection, ) -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( @@ -19,28 +19,12 @@ def _get_kwargs( connection_id: str, *, body: SyncConnectionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/connections/{connection_id}/sync", - "params": params, } _kwargs["json"] = body.to_dict() @@ -106,8 +90,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: SyncConnectionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ErrorResponse, HTTPValidationError, SyncConnectionResponseSyncconnection] ]: @@ -139,10 +121,8 @@ def sync_detailed( Returns a task ID for monitoring sync progress. Args: - graph_id (str): Graph database identifier + graph_id (str): connection_id (str): Connection identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (SyncConnectionRequest): Request to sync a connection. Raises: @@ -157,8 +137,6 @@ def sync_detailed( graph_id=graph_id, connection_id=connection_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -174,8 +152,6 @@ def sync( *, client: AuthenticatedClient, body: SyncConnectionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ErrorResponse, HTTPValidationError, SyncConnectionResponseSyncconnection] ]: @@ -207,10 +183,8 @@ def sync( Returns a task ID for monitoring sync progress. Args: - graph_id (str): Graph database identifier + graph_id (str): connection_id (str): Connection identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (SyncConnectionRequest): Request to sync a connection. Raises: @@ -226,8 +200,6 @@ def sync( connection_id=connection_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -237,8 +209,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: SyncConnectionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ErrorResponse, HTTPValidationError, SyncConnectionResponseSyncconnection] ]: @@ -270,10 +240,8 @@ async def asyncio_detailed( Returns a task ID for monitoring sync progress. Args: - graph_id (str): Graph database identifier + graph_id (str): connection_id (str): Connection identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (SyncConnectionRequest): Request to sync a connection. Raises: @@ -288,8 +256,6 @@ async def asyncio_detailed( graph_id=graph_id, connection_id=connection_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -303,8 +269,6 @@ async def asyncio( *, client: AuthenticatedClient, body: SyncConnectionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ErrorResponse, HTTPValidationError, SyncConnectionResponseSyncconnection] ]: @@ -336,10 +300,8 @@ async def asyncio( Returns a task ID for monitoring sync progress. Args: - graph_id (str): Graph database identifier + graph_id (str): connection_id (str): Connection identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (SyncConnectionRequest): Request to sync a connection. Raises: @@ -356,7 +318,5 @@ async def asyncio( connection_id=connection_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_analytics/get_graph_metrics.py b/robosystems_client/api/graph_analytics/get_graph_metrics.py index f4e84c6..682abed 100644 --- a/robosystems_client/api/graph_analytics/get_graph_metrics.py +++ b/robosystems_client/api/graph_analytics/get_graph_metrics.py @@ -8,37 +8,17 @@ from ...models.error_response import ErrorResponse from ...models.graph_metrics_response import GraphMetricsResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/analytics", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -91,8 +71,6 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, GraphMetricsResponse, HTTPValidationError]]: """Get Graph Metrics @@ -115,9 +93,7 @@ def sync_detailed( This operation is included - no credit consumption required. Args: - graph_id (str): The graph ID to get metrics for - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -129,8 +105,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -144,8 +118,6 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, GraphMetricsResponse, HTTPValidationError]]: """Get Graph Metrics @@ -168,9 +140,7 @@ def sync( This operation is included - no credit consumption required. Args: - graph_id (str): The graph ID to get metrics for - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -183,8 +153,6 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -192,8 +160,6 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, GraphMetricsResponse, HTTPValidationError]]: """Get Graph Metrics @@ -216,9 +182,7 @@ async def asyncio_detailed( This operation is included - no credit consumption required. Args: - graph_id (str): The graph ID to get metrics for - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -230,8 +194,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -243,8 +205,6 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, GraphMetricsResponse, HTTPValidationError]]: """Get Graph Metrics @@ -267,9 +227,7 @@ async def asyncio( This operation is included - no credit consumption required. Args: - graph_id (str): The graph ID to get metrics for - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -283,7 +241,5 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_analytics/get_graph_usage_stats.py b/robosystems_client/api/graph_analytics/get_graph_usage_stats.py index b0c516a..ac97422 100644 --- a/robosystems_client/api/graph_analytics/get_graph_usage_stats.py +++ b/robosystems_client/api/graph_analytics/get_graph_usage_stats.py @@ -15,24 +15,11 @@ def _get_kwargs( graph_id: str, *, include_details: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - params: dict[str, Any] = {} params["include_details"] = include_details - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -41,7 +28,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -90,8 +76,6 @@ def sync_detailed( *, client: AuthenticatedClient, include_details: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]: """Get Usage Statistics @@ -120,11 +104,9 @@ def sync_detailed( This operation is included - no credit consumption required. Args: - graph_id (str): The graph ID to get usage stats for + graph_id (str): include_details (Union[Unset, bool]): Include detailed metrics (may be slower) Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,8 +119,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, include_details=include_details, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -153,8 +133,6 @@ def sync( *, client: AuthenticatedClient, include_details: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]: """Get Usage Statistics @@ -183,11 +161,9 @@ def sync( This operation is included - no credit consumption required. Args: - graph_id (str): The graph ID to get usage stats for + graph_id (str): include_details (Union[Unset, bool]): Include detailed metrics (may be slower) Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -201,8 +177,6 @@ def sync( graph_id=graph_id, client=client, include_details=include_details, - token=token, - authorization=authorization, ).parsed @@ -211,8 +185,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, include_details: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]: """Get Usage Statistics @@ -241,11 +213,9 @@ async def asyncio_detailed( This operation is included - no credit consumption required. Args: - graph_id (str): The graph ID to get usage stats for + graph_id (str): include_details (Union[Unset, bool]): Include detailed metrics (may be slower) Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -258,8 +228,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, include_details=include_details, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -272,8 +240,6 @@ async def asyncio( *, client: AuthenticatedClient, include_details: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]: """Get Usage Statistics @@ -302,11 +268,9 @@ async def asyncio( This operation is included - no credit consumption required. Args: - graph_id (str): The graph ID to get usage stats for + graph_id (str): include_details (Union[Unset, bool]): Include detailed metrics (may be slower) Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -321,7 +285,5 @@ async def asyncio( graph_id=graph_id, client=client, include_details=include_details, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_billing/get_current_graph_bill.py b/robosystems_client/api/graph_billing/get_current_graph_bill.py index a3d003c..2cd41cf 100644 --- a/robosystems_client/api/graph_billing/get_current_graph_bill.py +++ b/robosystems_client/api/graph_billing/get_current_graph_bill.py @@ -10,37 +10,17 @@ GetCurrentGraphBillResponseGetcurrentgraphbill, ) from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/billing/current", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -103,8 +83,6 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ ErrorResponse, GetCurrentGraphBillResponseGetcurrentgraphbill, HTTPValidationError @@ -126,9 +104,7 @@ def sync_detailed( ā„¹ļø No credits are consumed for viewing billing information. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -140,8 +116,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -155,8 +129,6 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ ErrorResponse, GetCurrentGraphBillResponseGetcurrentgraphbill, HTTPValidationError @@ -178,9 +150,7 @@ def sync( ā„¹ļø No credits are consumed for viewing billing information. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -193,8 +163,6 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -202,8 +170,6 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ ErrorResponse, GetCurrentGraphBillResponseGetcurrentgraphbill, HTTPValidationError @@ -225,9 +191,7 @@ async def asyncio_detailed( ā„¹ļø No credits are consumed for viewing billing information. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -239,8 +203,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -252,8 +214,6 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ ErrorResponse, GetCurrentGraphBillResponseGetcurrentgraphbill, HTTPValidationError @@ -275,9 +235,7 @@ async def asyncio( ā„¹ļø No credits are consumed for viewing billing information. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -291,7 +249,5 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_billing/get_graph_billing_history.py b/robosystems_client/api/graph_billing/get_graph_billing_history.py index 61424af..019ca82 100644 --- a/robosystems_client/api/graph_billing/get_graph_billing_history.py +++ b/robosystems_client/api/graph_billing/get_graph_billing_history.py @@ -17,24 +17,11 @@ def _get_kwargs( graph_id: str, *, months: Union[Unset, int] = 6, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - params: dict[str, Any] = {} params["months"] = months - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -43,7 +30,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -111,8 +97,6 @@ def sync_detailed( *, client: AuthenticatedClient, months: Union[Unset, int] = 6, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ ErrorResponse, @@ -139,10 +123,8 @@ def sync_detailed( ā„¹ļø No credits are consumed for viewing billing history. Args: - graph_id (str): Graph database identifier + graph_id (str): months (Union[Unset, int]): Number of months to retrieve (1-24) Default: 6. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -155,8 +137,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, months=months, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -171,8 +151,6 @@ def sync( *, client: AuthenticatedClient, months: Union[Unset, int] = 6, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ ErrorResponse, @@ -199,10 +177,8 @@ def sync( ā„¹ļø No credits are consumed for viewing billing history. Args: - graph_id (str): Graph database identifier + graph_id (str): months (Union[Unset, int]): Number of months to retrieve (1-24) Default: 6. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -216,8 +192,6 @@ def sync( graph_id=graph_id, client=client, months=months, - token=token, - authorization=authorization, ).parsed @@ -226,8 +200,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, months: Union[Unset, int] = 6, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ ErrorResponse, @@ -254,10 +226,8 @@ async def asyncio_detailed( ā„¹ļø No credits are consumed for viewing billing history. Args: - graph_id (str): Graph database identifier + graph_id (str): months (Union[Unset, int]): Number of months to retrieve (1-24) Default: 6. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -270,8 +240,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, months=months, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -284,8 +252,6 @@ async def asyncio( *, client: AuthenticatedClient, months: Union[Unset, int] = 6, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ ErrorResponse, @@ -312,10 +278,8 @@ async def asyncio( ā„¹ļø No credits are consumed for viewing billing history. Args: - graph_id (str): Graph database identifier + graph_id (str): months (Union[Unset, int]): Number of months to retrieve (1-24) Default: 6. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -330,7 +294,5 @@ async def asyncio( graph_id=graph_id, client=client, months=months, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_billing/get_graph_monthly_bill.py b/robosystems_client/api/graph_billing/get_graph_monthly_bill.py index 371728c..2628f34 100644 --- a/robosystems_client/api/graph_billing/get_graph_monthly_bill.py +++ b/robosystems_client/api/graph_billing/get_graph_monthly_bill.py @@ -10,39 +10,19 @@ GetGraphMonthlyBillResponseGetgraphmonthlybill, ) from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, year: int, month: int, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/billing/history/{year}/{month}", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -112,8 +92,6 @@ def sync_detailed( month: int, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ ErrorResponse, GetGraphMonthlyBillResponseGetgraphmonthlybill, HTTPValidationError @@ -135,11 +113,9 @@ def sync_detailed( ā„¹ļø No credits are consumed for viewing billing history. Args: - graph_id (str): Graph database identifier + graph_id (str): year (int): Year (2024-2030) month (int): Month (1-12) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -153,8 +129,6 @@ def sync_detailed( graph_id=graph_id, year=year, month=month, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -170,8 +144,6 @@ def sync( month: int, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ ErrorResponse, GetGraphMonthlyBillResponseGetgraphmonthlybill, HTTPValidationError @@ -193,11 +165,9 @@ def sync( ā„¹ļø No credits are consumed for viewing billing history. Args: - graph_id (str): Graph database identifier + graph_id (str): year (int): Year (2024-2030) month (int): Month (1-12) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -212,8 +182,6 @@ def sync( year=year, month=month, client=client, - token=token, - authorization=authorization, ).parsed @@ -223,8 +191,6 @@ async def asyncio_detailed( month: int, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ ErrorResponse, GetGraphMonthlyBillResponseGetgraphmonthlybill, HTTPValidationError @@ -246,11 +212,9 @@ async def asyncio_detailed( ā„¹ļø No credits are consumed for viewing billing history. Args: - graph_id (str): Graph database identifier + graph_id (str): year (int): Year (2024-2030) month (int): Month (1-12) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -264,8 +228,6 @@ async def asyncio_detailed( graph_id=graph_id, year=year, month=month, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -279,8 +241,6 @@ async def asyncio( month: int, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ ErrorResponse, GetGraphMonthlyBillResponseGetgraphmonthlybill, HTTPValidationError @@ -302,11 +262,9 @@ async def asyncio( ā„¹ļø No credits are consumed for viewing billing history. Args: - graph_id (str): Graph database identifier + graph_id (str): year (int): Year (2024-2030) month (int): Month (1-12) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -322,7 +280,5 @@ async def asyncio( year=year, month=month, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_billing/get_graph_usage_details.py b/robosystems_client/api/graph_billing/get_graph_usage_details.py index 98357c9..1abc088 100644 --- a/robosystems_client/api/graph_billing/get_graph_usage_details.py +++ b/robosystems_client/api/graph_billing/get_graph_usage_details.py @@ -18,13 +18,7 @@ def _get_kwargs( *, year: Union[None, Unset, int] = UNSET, month: Union[None, Unset, int] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - params: dict[str, Any] = {} json_year: Union[None, Unset, int] @@ -41,13 +35,6 @@ def _get_kwargs( json_month = month params["month"] = json_month - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -56,7 +43,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -126,8 +112,6 @@ def sync_detailed( client: AuthenticatedClient, year: Union[None, Unset, int] = UNSET, month: Union[None, Unset, int] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ ErrorResponse, GetGraphUsageDetailsResponseGetgraphusagedetails, HTTPValidationError @@ -153,11 +137,9 @@ def sync_detailed( ā„¹ļø No credits are consumed for viewing usage details. Args: - graph_id (str): Graph database identifier + graph_id (str): year (Union[None, Unset, int]): Year (defaults to current) month (Union[None, Unset, int]): Month (defaults to current) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -171,8 +153,6 @@ def sync_detailed( graph_id=graph_id, year=year, month=month, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -188,8 +168,6 @@ def sync( client: AuthenticatedClient, year: Union[None, Unset, int] = UNSET, month: Union[None, Unset, int] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ ErrorResponse, GetGraphUsageDetailsResponseGetgraphusagedetails, HTTPValidationError @@ -215,11 +193,9 @@ def sync( ā„¹ļø No credits are consumed for viewing usage details. Args: - graph_id (str): Graph database identifier + graph_id (str): year (Union[None, Unset, int]): Year (defaults to current) month (Union[None, Unset, int]): Month (defaults to current) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -234,8 +210,6 @@ def sync( client=client, year=year, month=month, - token=token, - authorization=authorization, ).parsed @@ -245,8 +219,6 @@ async def asyncio_detailed( client: AuthenticatedClient, year: Union[None, Unset, int] = UNSET, month: Union[None, Unset, int] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ ErrorResponse, GetGraphUsageDetailsResponseGetgraphusagedetails, HTTPValidationError @@ -272,11 +244,9 @@ async def asyncio_detailed( ā„¹ļø No credits are consumed for viewing usage details. Args: - graph_id (str): Graph database identifier + graph_id (str): year (Union[None, Unset, int]): Year (defaults to current) month (Union[None, Unset, int]): Month (defaults to current) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -290,8 +260,6 @@ async def asyncio_detailed( graph_id=graph_id, year=year, month=month, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -305,8 +273,6 @@ async def asyncio( client: AuthenticatedClient, year: Union[None, Unset, int] = UNSET, month: Union[None, Unset, int] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ ErrorResponse, GetGraphUsageDetailsResponseGetgraphusagedetails, HTTPValidationError @@ -332,11 +298,9 @@ async def asyncio( ā„¹ļø No credits are consumed for viewing usage details. Args: - graph_id (str): Graph database identifier + graph_id (str): year (Union[None, Unset, int]): Year (defaults to current) month (Union[None, Unset, int]): Month (defaults to current) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -352,7 +316,5 @@ async def asyncio( client=client, year=year, month=month, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_credits/check_credit_balance.py b/robosystems_client/api/graph_credits/check_credit_balance.py index 53b5b3e..4e5c70a 100644 --- a/robosystems_client/api/graph_credits/check_credit_balance.py +++ b/robosystems_client/api/graph_credits/check_credit_balance.py @@ -18,13 +18,7 @@ def _get_kwargs( *, operation_type: str, base_cost: Union[None, Unset, float, str] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - params: dict[str, Any] = {} params["operation_type"] = operation_type @@ -36,13 +30,6 @@ def _get_kwargs( json_base_cost = base_cost params["base_cost"] = json_base_cost - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -51,7 +38,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -116,8 +102,6 @@ def sync_detailed( client: AuthenticatedClient, operation_type: str, base_cost: Union[None, Unset, float, str] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ CheckCreditBalanceResponseCheckcreditbalance, ErrorResponse, HTTPValidationError @@ -142,8 +126,6 @@ def sync_detailed( operation_type (str): Type of operation to check base_cost (Union[None, Unset, float, str]): Custom base cost (uses default if not provided) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -157,8 +139,6 @@ def sync_detailed( graph_id=graph_id, operation_type=operation_type, base_cost=base_cost, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -174,8 +154,6 @@ def sync( client: AuthenticatedClient, operation_type: str, base_cost: Union[None, Unset, float, str] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ CheckCreditBalanceResponseCheckcreditbalance, ErrorResponse, HTTPValidationError @@ -200,8 +178,6 @@ def sync( operation_type (str): Type of operation to check base_cost (Union[None, Unset, float, str]): Custom base cost (uses default if not provided) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -216,8 +192,6 @@ def sync( client=client, operation_type=operation_type, base_cost=base_cost, - token=token, - authorization=authorization, ).parsed @@ -227,8 +201,6 @@ async def asyncio_detailed( client: AuthenticatedClient, operation_type: str, base_cost: Union[None, Unset, float, str] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ CheckCreditBalanceResponseCheckcreditbalance, ErrorResponse, HTTPValidationError @@ -253,8 +225,6 @@ async def asyncio_detailed( operation_type (str): Type of operation to check base_cost (Union[None, Unset, float, str]): Custom base cost (uses default if not provided) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -268,8 +238,6 @@ async def asyncio_detailed( graph_id=graph_id, operation_type=operation_type, base_cost=base_cost, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -283,8 +251,6 @@ async def asyncio( client: AuthenticatedClient, operation_type: str, base_cost: Union[None, Unset, float, str] = UNSET, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ CheckCreditBalanceResponseCheckcreditbalance, ErrorResponse, HTTPValidationError @@ -309,8 +275,6 @@ async def asyncio( operation_type (str): Type of operation to check base_cost (Union[None, Unset, float, str]): Custom base cost (uses default if not provided) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -326,7 +290,5 @@ async def asyncio( client=client, operation_type=operation_type, base_cost=base_cost, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_credits/check_storage_limits.py b/robosystems_client/api/graph_credits/check_storage_limits.py index 1ec089e..0986333 100644 --- a/robosystems_client/api/graph_credits/check_storage_limits.py +++ b/robosystems_client/api/graph_credits/check_storage_limits.py @@ -8,37 +8,17 @@ from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError from ...models.storage_limit_response import StorageLimitResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/credits/storage/limits", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -91,8 +71,6 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, StorageLimitResponse]]: """Check Storage Limits @@ -109,8 +87,6 @@ def sync_detailed( Args: graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,8 +98,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -137,8 +111,6 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, StorageLimitResponse]]: """Check Storage Limits @@ -155,8 +127,6 @@ def sync( Args: graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -169,8 +139,6 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -178,8 +146,6 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, StorageLimitResponse]]: """Check Storage Limits @@ -196,8 +162,6 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -209,8 +173,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -222,8 +184,6 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, StorageLimitResponse]]: """Check Storage Limits @@ -240,8 +200,6 @@ async def asyncio( Args: graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -255,7 +213,5 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_credits/get_credit_summary.py b/robosystems_client/api/graph_credits/get_credit_summary.py index a83495c..2e6a952 100644 --- a/robosystems_client/api/graph_credits/get_credit_summary.py +++ b/robosystems_client/api/graph_credits/get_credit_summary.py @@ -8,37 +8,17 @@ from ...models.credit_summary_response import CreditSummaryResponse from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/credits/summary", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -91,8 +71,6 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[CreditSummaryResponse, ErrorResponse, HTTPValidationError]]: """Get Credit Summary @@ -108,8 +86,6 @@ def sync_detailed( Args: graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -121,8 +97,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -136,8 +110,6 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[CreditSummaryResponse, ErrorResponse, HTTPValidationError]]: """Get Credit Summary @@ -153,8 +125,6 @@ def sync( Args: graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -167,8 +137,6 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -176,8 +144,6 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[CreditSummaryResponse, ErrorResponse, HTTPValidationError]]: """Get Credit Summary @@ -193,8 +159,6 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -206,8 +170,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -219,8 +181,6 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[CreditSummaryResponse, ErrorResponse, HTTPValidationError]]: """Get Credit Summary @@ -236,8 +196,6 @@ async def asyncio( Args: graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -251,7 +209,5 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_credits/get_storage_usage.py b/robosystems_client/api/graph_credits/get_storage_usage.py index 4554910..05e2e8b 100644 --- a/robosystems_client/api/graph_credits/get_storage_usage.py +++ b/robosystems_client/api/graph_credits/get_storage_usage.py @@ -17,24 +17,11 @@ def _get_kwargs( graph_id: str, *, days: Union[Unset, int] = 30, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - params: dict[str, Any] = {} params["days"] = days - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -43,7 +30,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -96,8 +82,6 @@ def sync_detailed( *, client: AuthenticatedClient, days: Union[Unset, int] = 30, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ErrorResponse, GetStorageUsageResponseGetstorageusage, HTTPValidationError] ]: @@ -117,8 +101,6 @@ def sync_detailed( Args: graph_id (str): Graph database identifier days (Union[Unset, int]): Number of days of history to return Default: 30. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -131,8 +113,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, days=days, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -147,8 +127,6 @@ def sync( *, client: AuthenticatedClient, days: Union[Unset, int] = 30, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ErrorResponse, GetStorageUsageResponseGetstorageusage, HTTPValidationError] ]: @@ -168,8 +146,6 @@ def sync( Args: graph_id (str): Graph database identifier days (Union[Unset, int]): Number of days of history to return Default: 30. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -183,8 +159,6 @@ def sync( graph_id=graph_id, client=client, days=days, - token=token, - authorization=authorization, ).parsed @@ -193,8 +167,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, days: Union[Unset, int] = 30, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ErrorResponse, GetStorageUsageResponseGetstorageusage, HTTPValidationError] ]: @@ -214,8 +186,6 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier days (Union[Unset, int]): Number of days of history to return Default: 30. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -228,8 +198,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, days=days, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -242,8 +210,6 @@ async def asyncio( *, client: AuthenticatedClient, days: Union[Unset, int] = 30, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ErrorResponse, GetStorageUsageResponseGetstorageusage, HTTPValidationError] ]: @@ -263,8 +229,6 @@ async def asyncio( Args: graph_id (str): Graph database identifier days (Union[Unset, int]): Number of days of history to return Default: 30. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -279,7 +243,5 @@ async def asyncio( graph_id=graph_id, client=client, days=days, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_credits/list_credit_transactions.py b/robosystems_client/api/graph_credits/list_credit_transactions.py index 094a3ce..b0aa6c1 100644 --- a/robosystems_client/api/graph_credits/list_credit_transactions.py +++ b/robosystems_client/api/graph_credits/list_credit_transactions.py @@ -20,13 +20,7 @@ def _get_kwargs( end_date: Union[None, Unset, str] = UNSET, limit: Union[Unset, int] = 100, offset: Union[Unset, int] = 0, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - params: dict[str, Any] = {} json_transaction_type: Union[None, Unset, str] @@ -61,13 +55,6 @@ def _get_kwargs( params["offset"] = offset - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -76,7 +63,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -135,8 +121,6 @@ def sync_detailed( end_date: Union[None, Unset, str] = UNSET, limit: Union[Unset, int] = 100, offset: Union[Unset, int] = 0, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[DetailedTransactionsResponse, ErrorResponse, HTTPValidationError]]: """List Credit Transactions @@ -157,7 +141,7 @@ def sync_detailed( No credits are consumed for viewing transaction history. Args: - graph_id (str): Graph database identifier + graph_id (str): transaction_type (Union[None, Unset, str]): Filter by transaction type (allocation, consumption, bonus, refund) operation_type (Union[None, Unset, str]): Filter by operation type (e.g., entity_lookup, @@ -166,8 +150,6 @@ def sync_detailed( end_date (Union[None, Unset, str]): End date for filtering (ISO format: YYYY-MM-DD) limit (Union[Unset, int]): Maximum number of transactions to return Default: 100. offset (Union[Unset, int]): Number of transactions to skip Default: 0. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -185,8 +167,6 @@ def sync_detailed( end_date=end_date, limit=limit, offset=offset, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -206,8 +186,6 @@ def sync( end_date: Union[None, Unset, str] = UNSET, limit: Union[Unset, int] = 100, offset: Union[Unset, int] = 0, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[DetailedTransactionsResponse, ErrorResponse, HTTPValidationError]]: """List Credit Transactions @@ -228,7 +206,7 @@ def sync( No credits are consumed for viewing transaction history. Args: - graph_id (str): Graph database identifier + graph_id (str): transaction_type (Union[None, Unset, str]): Filter by transaction type (allocation, consumption, bonus, refund) operation_type (Union[None, Unset, str]): Filter by operation type (e.g., entity_lookup, @@ -237,8 +215,6 @@ def sync( end_date (Union[None, Unset, str]): End date for filtering (ISO format: YYYY-MM-DD) limit (Union[Unset, int]): Maximum number of transactions to return Default: 100. offset (Union[Unset, int]): Number of transactions to skip Default: 0. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -257,8 +233,6 @@ def sync( end_date=end_date, limit=limit, offset=offset, - token=token, - authorization=authorization, ).parsed @@ -272,8 +246,6 @@ async def asyncio_detailed( end_date: Union[None, Unset, str] = UNSET, limit: Union[Unset, int] = 100, offset: Union[Unset, int] = 0, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[DetailedTransactionsResponse, ErrorResponse, HTTPValidationError]]: """List Credit Transactions @@ -294,7 +266,7 @@ async def asyncio_detailed( No credits are consumed for viewing transaction history. Args: - graph_id (str): Graph database identifier + graph_id (str): transaction_type (Union[None, Unset, str]): Filter by transaction type (allocation, consumption, bonus, refund) operation_type (Union[None, Unset, str]): Filter by operation type (e.g., entity_lookup, @@ -303,8 +275,6 @@ async def asyncio_detailed( end_date (Union[None, Unset, str]): End date for filtering (ISO format: YYYY-MM-DD) limit (Union[Unset, int]): Maximum number of transactions to return Default: 100. offset (Union[Unset, int]): Number of transactions to skip Default: 0. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -322,8 +292,6 @@ async def asyncio_detailed( end_date=end_date, limit=limit, offset=offset, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -341,8 +309,6 @@ async def asyncio( end_date: Union[None, Unset, str] = UNSET, limit: Union[Unset, int] = 100, offset: Union[Unset, int] = 0, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[DetailedTransactionsResponse, ErrorResponse, HTTPValidationError]]: """List Credit Transactions @@ -363,7 +329,7 @@ async def asyncio( No credits are consumed for viewing transaction history. Args: - graph_id (str): Graph database identifier + graph_id (str): transaction_type (Union[None, Unset, str]): Filter by transaction type (allocation, consumption, bonus, refund) operation_type (Union[None, Unset, str]): Filter by operation type (e.g., entity_lookup, @@ -372,8 +338,6 @@ async def asyncio( end_date (Union[None, Unset, str]): End date for filtering (ISO format: YYYY-MM-DD) limit (Union[Unset, int]): Maximum number of transactions to return Default: 100. offset (Union[Unset, int]): Number of transactions to skip Default: 0. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -393,7 +357,5 @@ async def asyncio( end_date=end_date, limit=limit, offset=offset, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_health/get_database_health.py b/robosystems_client/api/graph_health/get_database_health.py index c944c40..32542f9 100644 --- a/robosystems_client/api/graph_health/get_database_health.py +++ b/robosystems_client/api/graph_health/get_database_health.py @@ -7,37 +7,17 @@ from ...client import AuthenticatedClient, Client from ...models.database_health_response import DatabaseHealthResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/health", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -87,8 +67,6 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, DatabaseHealthResponse, HTTPValidationError]]: """Database Health Check @@ -111,9 +89,7 @@ def sync_detailed( This endpoint provides essential monitoring data for operational visibility. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -125,8 +101,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -140,8 +114,6 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, DatabaseHealthResponse, HTTPValidationError]]: """Database Health Check @@ -164,9 +136,7 @@ def sync( This endpoint provides essential monitoring data for operational visibility. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -179,8 +149,6 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -188,8 +156,6 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, DatabaseHealthResponse, HTTPValidationError]]: """Database Health Check @@ -212,9 +178,7 @@ async def asyncio_detailed( This endpoint provides essential monitoring data for operational visibility. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -226,8 +190,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -239,8 +201,6 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, DatabaseHealthResponse, HTTPValidationError]]: """Database Health Check @@ -263,9 +223,7 @@ async def asyncio( This endpoint provides essential monitoring data for operational visibility. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -279,7 +237,5 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_info/get_database_info.py b/robosystems_client/api/graph_info/get_database_info.py index cfd9c22..5865c5d 100644 --- a/robosystems_client/api/graph_info/get_database_info.py +++ b/robosystems_client/api/graph_info/get_database_info.py @@ -7,37 +7,17 @@ from ...client import AuthenticatedClient, Client from ...models.database_info_response import DatabaseInfoResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/info", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -87,8 +67,6 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, DatabaseInfoResponse, HTTPValidationError]]: """Database Information @@ -112,9 +90,7 @@ def sync_detailed( This endpoint provides essential database information for capacity planning and monitoring. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -126,8 +102,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -141,8 +115,6 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, DatabaseInfoResponse, HTTPValidationError]]: """Database Information @@ -166,9 +138,7 @@ def sync( This endpoint provides essential database information for capacity planning and monitoring. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -181,8 +151,6 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -190,8 +158,6 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, DatabaseInfoResponse, HTTPValidationError]]: """Database Information @@ -215,9 +181,7 @@ async def asyncio_detailed( This endpoint provides essential database information for capacity planning and monitoring. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -229,8 +193,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -242,8 +204,6 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, DatabaseInfoResponse, HTTPValidationError]]: """Database Information @@ -267,9 +227,7 @@ async def asyncio( This endpoint provides essential database information for capacity planning and monitoring. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -283,7 +241,5 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_limits/get_graph_limits.py b/robosystems_client/api/graph_limits/get_graph_limits.py index 962bce4..8628679 100644 --- a/robosystems_client/api/graph_limits/get_graph_limits.py +++ b/robosystems_client/api/graph_limits/get_graph_limits.py @@ -9,37 +9,17 @@ GetGraphLimitsResponseGetgraphlimits, ) from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/limits", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -89,8 +69,6 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]]: """Get Graph Operational Limits @@ -109,9 +87,7 @@ def sync_detailed( **Note**: Limits vary based on subscription tier (Standard, Enterprise, Premium). Args: - graph_id (str): Graph database identifier (user graph or shared repository) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -123,8 +99,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -138,8 +112,6 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]]: """Get Graph Operational Limits @@ -158,9 +130,7 @@ def sync( **Note**: Limits vary based on subscription tier (Standard, Enterprise, Premium). Args: - graph_id (str): Graph database identifier (user graph or shared repository) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,8 +143,6 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -182,8 +150,6 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]]: """Get Graph Operational Limits @@ -202,9 +168,7 @@ async def asyncio_detailed( **Note**: Limits vary based on subscription tier (Standard, Enterprise, Premium). Args: - graph_id (str): Graph database identifier (user graph or shared repository) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -216,8 +180,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -229,8 +191,6 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]]: """Get Graph Operational Limits @@ -249,9 +209,7 @@ async def asyncio( **Note**: Limits vary based on subscription tier (Standard, Enterprise, Premium). Args: - graph_id (str): Graph database identifier (user graph or shared repository) - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -265,7 +223,5 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graphs/create_graph.py b/robosystems_client/api/graphs/create_graph.py index 33157dc..1bac42e 100644 --- a/robosystems_client/api/graphs/create_graph.py +++ b/robosystems_client/api/graphs/create_graph.py @@ -7,34 +7,18 @@ from ...client import AuthenticatedClient, Client from ...models.create_graph_request import CreateGraphRequest from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( *, body: CreateGraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/graphs", - "params": params, } _kwargs["json"] = body.to_dict() @@ -78,8 +62,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: CreateGraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: """Create New Graph Database @@ -125,13 +107,12 @@ def sync_detailed( - `_links.status`: Point-in-time status check endpoint Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (CreateGraphRequest): Request model for creating a new graph. Example: - {'initial_entity': {'cik': '0001234567', 'name': 'Acme Corp', 'uri': 'https://acme.com'}, - 'instance_tier': 'kuzu-standard', 'metadata': {'description': 'Main production graph', - 'graph_name': 'Production System', 'schema_extensions': ['roboledger']}, 'tags': - ['production', 'finance']}. + {'initial_entity': {'cik': '0001234567', 'name': 'Acme Consulting LLC', 'uri': + 'https://acmeconsulting.com'}, 'instance_tier': 'kuzu-standard', 'metadata': + {'description': 'Professional consulting services with full accounting integration', + 'graph_name': 'Acme Consulting LLC', 'schema_extensions': ['roboledger']}, 'tags': + ['consulting', 'professional-services']}. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -143,8 +124,6 @@ def sync_detailed( kwargs = _get_kwargs( body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -158,8 +137,6 @@ def sync( *, client: AuthenticatedClient, body: CreateGraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: """Create New Graph Database @@ -205,13 +182,12 @@ def sync( - `_links.status`: Point-in-time status check endpoint Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (CreateGraphRequest): Request model for creating a new graph. Example: - {'initial_entity': {'cik': '0001234567', 'name': 'Acme Corp', 'uri': 'https://acme.com'}, - 'instance_tier': 'kuzu-standard', 'metadata': {'description': 'Main production graph', - 'graph_name': 'Production System', 'schema_extensions': ['roboledger']}, 'tags': - ['production', 'finance']}. + {'initial_entity': {'cik': '0001234567', 'name': 'Acme Consulting LLC', 'uri': + 'https://acmeconsulting.com'}, 'instance_tier': 'kuzu-standard', 'metadata': + {'description': 'Professional consulting services with full accounting integration', + 'graph_name': 'Acme Consulting LLC', 'schema_extensions': ['roboledger']}, 'tags': + ['consulting', 'professional-services']}. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -224,8 +200,6 @@ def sync( return sync_detailed( client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -233,8 +207,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: CreateGraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: """Create New Graph Database @@ -280,13 +252,12 @@ async def asyncio_detailed( - `_links.status`: Point-in-time status check endpoint Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (CreateGraphRequest): Request model for creating a new graph. Example: - {'initial_entity': {'cik': '0001234567', 'name': 'Acme Corp', 'uri': 'https://acme.com'}, - 'instance_tier': 'kuzu-standard', 'metadata': {'description': 'Main production graph', - 'graph_name': 'Production System', 'schema_extensions': ['roboledger']}, 'tags': - ['production', 'finance']}. + {'initial_entity': {'cik': '0001234567', 'name': 'Acme Consulting LLC', 'uri': + 'https://acmeconsulting.com'}, 'instance_tier': 'kuzu-standard', 'metadata': + {'description': 'Professional consulting services with full accounting integration', + 'graph_name': 'Acme Consulting LLC', 'schema_extensions': ['roboledger']}, 'tags': + ['consulting', 'professional-services']}. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -298,8 +269,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -311,8 +280,6 @@ async def asyncio( *, client: AuthenticatedClient, body: CreateGraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: """Create New Graph Database @@ -358,13 +325,12 @@ async def asyncio( - `_links.status`: Point-in-time status check endpoint Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (CreateGraphRequest): Request model for creating a new graph. Example: - {'initial_entity': {'cik': '0001234567', 'name': 'Acme Corp', 'uri': 'https://acme.com'}, - 'instance_tier': 'kuzu-standard', 'metadata': {'description': 'Main production graph', - 'graph_name': 'Production System', 'schema_extensions': ['roboledger']}, 'tags': - ['production', 'finance']}. + {'initial_entity': {'cik': '0001234567', 'name': 'Acme Consulting LLC', 'uri': + 'https://acmeconsulting.com'}, 'instance_tier': 'kuzu-standard', 'metadata': + {'description': 'Professional consulting services with full accounting integration', + 'graph_name': 'Acme Consulting LLC', 'schema_extensions': ['roboledger']}, 'tags': + ['consulting', 'professional-services']}. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -378,7 +344,5 @@ async def asyncio( await asyncio_detailed( client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graphs/get_available_extensions.py b/robosystems_client/api/graphs/get_available_extensions.py index 22323de..44e2797 100644 --- a/robosystems_client/api/graphs/get_available_extensions.py +++ b/robosystems_client/api/graphs/get_available_extensions.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any, Optional, Union, cast import httpx @@ -20,12 +20,16 @@ def _get_kwargs() -> dict[str, Any]: def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[AvailableExtensionsResponse]: +) -> Optional[Union[Any, AvailableExtensionsResponse]]: if response.status_code == 200: response_200 = AvailableExtensionsResponse.from_dict(response.json()) return response_200 + if response.status_code == 500: + response_500 = cast(Any, None) + return response_500 + if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -34,7 +38,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[AvailableExtensionsResponse]: +) -> Response[Union[Any, AvailableExtensionsResponse]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -46,17 +50,45 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, -) -> Response[AvailableExtensionsResponse]: +) -> Response[Union[Any, AvailableExtensionsResponse]]: """Get Available Schema Extensions - List all available schema extensions for graph creation + List all available schema extensions for graph creation. + + Schema extensions provide pre-built industry-specific data models that extend + the base graph schema with specialized nodes, relationships, and properties. + + **Available Extensions:** + - **RoboLedger**: Complete accounting system with XBRL reporting, general ledger, and financial + statements + - **RoboInvestor**: Investment portfolio management and tracking + - **RoboSCM**: Supply chain management and logistics + - **RoboFO**: Front office operations and CRM + - **RoboHRM**: Human resources management + - **RoboEPM**: Enterprise performance management + - **RoboReport**: Business intelligence and reporting + + **Extension Information:** + Each extension includes: + - Display name and description + - Node and relationship counts + - Context-aware capabilities (e.g., SEC repositories get different features than entity graphs) + + **Use Cases:** + - Browse available extensions before creating a graph + - Understand extension capabilities and data models + - Plan graph schema based on business requirements + - Combine multiple extensions for comprehensive data modeling + + **Note:** + Extension listing is included - no credit consumption required. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AvailableExtensionsResponse] + Response[Union[Any, AvailableExtensionsResponse]] """ kwargs = _get_kwargs() @@ -71,17 +103,45 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, -) -> Optional[AvailableExtensionsResponse]: +) -> Optional[Union[Any, AvailableExtensionsResponse]]: """Get Available Schema Extensions - List all available schema extensions for graph creation + List all available schema extensions for graph creation. + + Schema extensions provide pre-built industry-specific data models that extend + the base graph schema with specialized nodes, relationships, and properties. + + **Available Extensions:** + - **RoboLedger**: Complete accounting system with XBRL reporting, general ledger, and financial + statements + - **RoboInvestor**: Investment portfolio management and tracking + - **RoboSCM**: Supply chain management and logistics + - **RoboFO**: Front office operations and CRM + - **RoboHRM**: Human resources management + - **RoboEPM**: Enterprise performance management + - **RoboReport**: Business intelligence and reporting + + **Extension Information:** + Each extension includes: + - Display name and description + - Node and relationship counts + - Context-aware capabilities (e.g., SEC repositories get different features than entity graphs) + + **Use Cases:** + - Browse available extensions before creating a graph + - Understand extension capabilities and data models + - Plan graph schema based on business requirements + - Combine multiple extensions for comprehensive data modeling + + **Note:** + Extension listing is included - no credit consumption required. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AvailableExtensionsResponse + Union[Any, AvailableExtensionsResponse] """ return sync_detailed( @@ -92,17 +152,45 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, -) -> Response[AvailableExtensionsResponse]: +) -> Response[Union[Any, AvailableExtensionsResponse]]: """Get Available Schema Extensions - List all available schema extensions for graph creation + List all available schema extensions for graph creation. + + Schema extensions provide pre-built industry-specific data models that extend + the base graph schema with specialized nodes, relationships, and properties. + + **Available Extensions:** + - **RoboLedger**: Complete accounting system with XBRL reporting, general ledger, and financial + statements + - **RoboInvestor**: Investment portfolio management and tracking + - **RoboSCM**: Supply chain management and logistics + - **RoboFO**: Front office operations and CRM + - **RoboHRM**: Human resources management + - **RoboEPM**: Enterprise performance management + - **RoboReport**: Business intelligence and reporting + + **Extension Information:** + Each extension includes: + - Display name and description + - Node and relationship counts + - Context-aware capabilities (e.g., SEC repositories get different features than entity graphs) + + **Use Cases:** + - Browse available extensions before creating a graph + - Understand extension capabilities and data models + - Plan graph schema based on business requirements + - Combine multiple extensions for comprehensive data modeling + + **Note:** + Extension listing is included - no credit consumption required. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AvailableExtensionsResponse] + Response[Union[Any, AvailableExtensionsResponse]] """ kwargs = _get_kwargs() @@ -115,17 +203,45 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, -) -> Optional[AvailableExtensionsResponse]: +) -> Optional[Union[Any, AvailableExtensionsResponse]]: """Get Available Schema Extensions - List all available schema extensions for graph creation + List all available schema extensions for graph creation. + + Schema extensions provide pre-built industry-specific data models that extend + the base graph schema with specialized nodes, relationships, and properties. + + **Available Extensions:** + - **RoboLedger**: Complete accounting system with XBRL reporting, general ledger, and financial + statements + - **RoboInvestor**: Investment portfolio management and tracking + - **RoboSCM**: Supply chain management and logistics + - **RoboFO**: Front office operations and CRM + - **RoboHRM**: Human resources management + - **RoboEPM**: Enterprise performance management + - **RoboReport**: Business intelligence and reporting + + **Extension Information:** + Each extension includes: + - Display name and description + - Node and relationship counts + - Context-aware capabilities (e.g., SEC repositories get different features than entity graphs) + + **Use Cases:** + - Browse available extensions before creating a graph + - Understand extension capabilities and data models + - Plan graph schema based on business requirements + - Combine multiple extensions for comprehensive data modeling + + **Note:** + Extension listing is included - no credit consumption required. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AvailableExtensionsResponse + Union[Any, AvailableExtensionsResponse] """ return ( diff --git a/robosystems_client/api/graphs/get_graphs.py b/robosystems_client/api/graphs/get_graphs.py index 8475343..7ca98a7 100644 --- a/robosystems_client/api/graphs/get_graphs.py +++ b/robosystems_client/api/graphs/get_graphs.py @@ -1,57 +1,34 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.http_validation_error import HTTPValidationError from ...models.user_graphs_response import UserGraphsResponse -from ...types import UNSET, Response, Unset +from ...types import Response -def _get_kwargs( - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/graphs", - "params": params, } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[HTTPValidationError, UserGraphsResponse]]: +) -> Optional[Union[Any, UserGraphsResponse]]: if response.status_code == 200: response_200 = UserGraphsResponse.from_dict(response.json()) return response_200 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 + if response.status_code == 500: + response_500 = cast(Any, None) + return response_500 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -61,7 +38,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[HTTPValidationError, UserGraphsResponse]]: +) -> Response[Union[Any, UserGraphsResponse]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,29 +50,53 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[HTTPValidationError, UserGraphsResponse]]: - """Get User Graphs +) -> Response[Union[Any, UserGraphsResponse]]: + r"""Get User Graphs + + List all graph databases accessible to the current user with roles and selection status. + + Returns a comprehensive list of all graphs the user can access, including their + role in each graph (admin or member) and which graph is currently selected as + the active workspace. + + **Returned Information:** + - Graph ID and display name for each accessible graph + - User's role (admin/member) indicating permission level + - Selection status (one graph can be marked as \"selected\") + - Creation timestamp for each graph - Get all graph databases accessible to the current user. + **Graph Roles:** + - `admin`: Full access - can manage graph settings, invite users, delete graph + - `member`: Read/write access - can query and modify data, cannot manage settings - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + **Selected Graph Concept:** + The \"selected\" graph is the user's currently active workspace. Many API operations + default to the selected graph if no graph_id is provided. Users can change their + selected graph via the `POST /v1/graphs/{graph_id}/select` endpoint. + + **Use Cases:** + - Display graph selector in UI + - Show user's accessible workspaces + - Identify which graph is currently active + - Filter graphs by role for permission-based features + + **Empty Response:** + New users or users without graph access will receive an empty list with + `selectedGraphId: null`. Users should create a new graph or request access + to an existing graph. + + **Note:** + Graph listing is included - no credit consumption required. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[HTTPValidationError, UserGraphsResponse]] + Response[Union[Any, UserGraphsResponse]] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -107,58 +108,107 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[HTTPValidationError, UserGraphsResponse]]: - """Get User Graphs +) -> Optional[Union[Any, UserGraphsResponse]]: + r"""Get User Graphs + + List all graph databases accessible to the current user with roles and selection status. + + Returns a comprehensive list of all graphs the user can access, including their + role in each graph (admin or member) and which graph is currently selected as + the active workspace. + + **Returned Information:** + - Graph ID and display name for each accessible graph + - User's role (admin/member) indicating permission level + - Selection status (one graph can be marked as \"selected\") + - Creation timestamp for each graph + + **Graph Roles:** + - `admin`: Full access - can manage graph settings, invite users, delete graph + - `member`: Read/write access - can query and modify data, cannot manage settings - Get all graph databases accessible to the current user. + **Selected Graph Concept:** + The \"selected\" graph is the user's currently active workspace. Many API operations + default to the selected graph if no graph_id is provided. Users can change their + selected graph via the `POST /v1/graphs/{graph_id}/select` endpoint. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + **Use Cases:** + - Display graph selector in UI + - Show user's accessible workspaces + - Identify which graph is currently active + - Filter graphs by role for permission-based features + + **Empty Response:** + New users or users without graph access will receive an empty list with + `selectedGraphId: null`. Users should create a new graph or request access + to an existing graph. + + **Note:** + Graph listing is included - no credit consumption required. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[HTTPValidationError, UserGraphsResponse] + Union[Any, UserGraphsResponse] """ return sync_detailed( client=client, - token=token, - authorization=authorization, ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[HTTPValidationError, UserGraphsResponse]]: - """Get User Graphs +) -> Response[Union[Any, UserGraphsResponse]]: + r"""Get User Graphs + + List all graph databases accessible to the current user with roles and selection status. + + Returns a comprehensive list of all graphs the user can access, including their + role in each graph (admin or member) and which graph is currently selected as + the active workspace. + + **Returned Information:** + - Graph ID and display name for each accessible graph + - User's role (admin/member) indicating permission level + - Selection status (one graph can be marked as \"selected\") + - Creation timestamp for each graph + + **Graph Roles:** + - `admin`: Full access - can manage graph settings, invite users, delete graph + - `member`: Read/write access - can query and modify data, cannot manage settings + + **Selected Graph Concept:** + The \"selected\" graph is the user's currently active workspace. Many API operations + default to the selected graph if no graph_id is provided. Users can change their + selected graph via the `POST /v1/graphs/{graph_id}/select` endpoint. + + **Use Cases:** + - Display graph selector in UI + - Show user's accessible workspaces + - Identify which graph is currently active + - Filter graphs by role for permission-based features - Get all graph databases accessible to the current user. + **Empty Response:** + New users or users without graph access will receive an empty list with + `selectedGraphId: null`. Users should create a new graph or request access + to an existing graph. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + **Note:** + Graph listing is included - no credit consumption required. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[HTTPValidationError, UserGraphsResponse]] + Response[Union[Any, UserGraphsResponse]] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = await client.get_async_httpx_client().request(**kwargs) @@ -168,29 +218,54 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[HTTPValidationError, UserGraphsResponse]]: - """Get User Graphs +) -> Optional[Union[Any, UserGraphsResponse]]: + r"""Get User Graphs + + List all graph databases accessible to the current user with roles and selection status. + + Returns a comprehensive list of all graphs the user can access, including their + role in each graph (admin or member) and which graph is currently selected as + the active workspace. + + **Returned Information:** + - Graph ID and display name for each accessible graph + - User's role (admin/member) indicating permission level + - Selection status (one graph can be marked as \"selected\") + - Creation timestamp for each graph + + **Graph Roles:** + - `admin`: Full access - can manage graph settings, invite users, delete graph + - `member`: Read/write access - can query and modify data, cannot manage settings + + **Selected Graph Concept:** + The \"selected\" graph is the user's currently active workspace. Many API operations + default to the selected graph if no graph_id is provided. Users can change their + selected graph via the `POST /v1/graphs/{graph_id}/select` endpoint. + + **Use Cases:** + - Display graph selector in UI + - Show user's accessible workspaces + - Identify which graph is currently active + - Filter graphs by role for permission-based features - Get all graph databases accessible to the current user. + **Empty Response:** + New users or users without graph access will receive an empty list with + `selectedGraphId: null`. Users should create a new graph or request access + to an existing graph. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + **Note:** + Graph listing is included - no credit consumption required. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[HTTPValidationError, UserGraphsResponse] + Union[Any, UserGraphsResponse] """ return ( await asyncio_detailed( client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graphs/select_graph.py b/robosystems_client/api/graphs/select_graph.py index 5d7b54d..2b35685 100644 --- a/robosystems_client/api/graphs/select_graph.py +++ b/robosystems_client/api/graphs/select_graph.py @@ -8,37 +8,17 @@ from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError from ...models.success_response import SuccessResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/select", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -91,17 +71,41 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Select Graph - Select a specific graph as the active graph for the user. + Select a specific graph as the active workspace for the user. + + The selected graph becomes the default context for operations in client applications + and can be used to maintain user workspace preferences across sessions. + + **Functionality:** + - Sets the specified graph as the user's currently selected graph + - Deselects any previously selected graph (only one can be selected at a time) + - Persists selection across sessions until changed + - Returns confirmation with the selected graph ID + + **Requirements:** + - User must have access to the graph (as admin or member) + - Graph must exist and not be deleted + - User can only select graphs they have permission to access + + **Use Cases:** + - Switch between multiple graphs in a multi-graph environment + - Set default workspace after creating a new graph + - Restore user's preferred workspace on login + - Support graph context switching in client applications + + **Client Integration:** + Many client operations can default to the selected graph, simplifying API calls + by eliminating the need to specify graph_id repeatedly. Check the selected + graph with `GET /v1/graphs` which returns `selectedGraphId`. + + **Note:** + Graph selection is included - no credit consumption required. Args: graph_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -113,8 +117,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -128,17 +130,41 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Select Graph - Select a specific graph as the active graph for the user. + Select a specific graph as the active workspace for the user. + + The selected graph becomes the default context for operations in client applications + and can be used to maintain user workspace preferences across sessions. + + **Functionality:** + - Sets the specified graph as the user's currently selected graph + - Deselects any previously selected graph (only one can be selected at a time) + - Persists selection across sessions until changed + - Returns confirmation with the selected graph ID + + **Requirements:** + - User must have access to the graph (as admin or member) + - Graph must exist and not be deleted + - User can only select graphs they have permission to access + + **Use Cases:** + - Switch between multiple graphs in a multi-graph environment + - Set default workspace after creating a new graph + - Restore user's preferred workspace on login + - Support graph context switching in client applications + + **Client Integration:** + Many client operations can default to the selected graph, simplifying API calls + by eliminating the need to specify graph_id repeatedly. Check the selected + graph with `GET /v1/graphs` which returns `selectedGraphId`. + + **Note:** + Graph selection is included - no credit consumption required. Args: graph_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -151,8 +177,6 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -160,17 +184,41 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Select Graph - Select a specific graph as the active graph for the user. + Select a specific graph as the active workspace for the user. + + The selected graph becomes the default context for operations in client applications + and can be used to maintain user workspace preferences across sessions. + + **Functionality:** + - Sets the specified graph as the user's currently selected graph + - Deselects any previously selected graph (only one can be selected at a time) + - Persists selection across sessions until changed + - Returns confirmation with the selected graph ID + + **Requirements:** + - User must have access to the graph (as admin or member) + - Graph must exist and not be deleted + - User can only select graphs they have permission to access + + **Use Cases:** + - Switch between multiple graphs in a multi-graph environment + - Set default workspace after creating a new graph + - Restore user's preferred workspace on login + - Support graph context switching in client applications + + **Client Integration:** + Many client operations can default to the selected graph, simplifying API calls + by eliminating the need to specify graph_id repeatedly. Check the selected + graph with `GET /v1/graphs` which returns `selectedGraphId`. + + **Note:** + Graph selection is included - no credit consumption required. Args: graph_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -182,8 +230,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -195,17 +241,41 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Select Graph - Select a specific graph as the active graph for the user. + Select a specific graph as the active workspace for the user. + + The selected graph becomes the default context for operations in client applications + and can be used to maintain user workspace preferences across sessions. + + **Functionality:** + - Sets the specified graph as the user's currently selected graph + - Deselects any previously selected graph (only one can be selected at a time) + - Persists selection across sessions until changed + - Returns confirmation with the selected graph ID + + **Requirements:** + - User must have access to the graph (as admin or member) + - Graph must exist and not be deleted + - User can only select graphs they have permission to access + + **Use Cases:** + - Switch between multiple graphs in a multi-graph environment + - Set default workspace after creating a new graph + - Restore user's preferred workspace on login + - Support graph context switching in client applications + + **Client Integration:** + Many client operations can default to the selected graph, simplifying API calls + by eliminating the need to specify graph_id repeatedly. Check the selected + graph with `GET /v1/graphs` which returns `selectedGraphId`. + + **Note:** + Graph selection is included - no credit consumption required. Args: graph_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -219,7 +289,5 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/mcp/call_mcp_tool.py b/robosystems_client/api/mcp/call_mcp_tool.py index 6ce89c3..ee20506 100644 --- a/robosystems_client/api/mcp/call_mcp_tool.py +++ b/robosystems_client/api/mcp/call_mcp_tool.py @@ -17,12 +17,8 @@ def _get_kwargs( body: MCPToolCall, format_: Union[None, Unset, str] = UNSET, test_mode: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization params: dict[str, Any] = {} @@ -35,13 +31,6 @@ def _get_kwargs( params["test_mode"] = test_mode - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -133,8 +122,6 @@ def sync_detailed( body: MCPToolCall, format_: Union[None, Unset, str] = UNSET, test_mode: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Execute MCP Tool @@ -170,15 +157,16 @@ def sync_detailed( - `408 Request Timeout`: Tool execution exceeded timeout - Clients should implement exponential backoff on errors - **Note:** - MCP tool calls are included and do not consume credits. + **Credit Model:** + MCP tool execution is included - no credit consumption required. Database + operations (queries, schema inspection, analytics) are completely free. + Only AI operations that invoke Claude or other LLM APIs consume credits, + which happens at the AI agent layer, not the MCP tool layer. Args: - graph_id (str): Graph database identifier + graph_id (str): format_ (Union[None, Unset, str]): Response format override (json, sse, ndjson) test_mode (Union[Unset, bool]): Enable test mode for debugging Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (MCPToolCall): Request model for MCP tool execution. Raises: @@ -194,8 +182,6 @@ def sync_detailed( body=body, format_=format_, test_mode=test_mode, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -212,8 +198,6 @@ def sync( body: MCPToolCall, format_: Union[None, Unset, str] = UNSET, test_mode: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Execute MCP Tool @@ -249,15 +233,16 @@ def sync( - `408 Request Timeout`: Tool execution exceeded timeout - Clients should implement exponential backoff on errors - **Note:** - MCP tool calls are included and do not consume credits. + **Credit Model:** + MCP tool execution is included - no credit consumption required. Database + operations (queries, schema inspection, analytics) are completely free. + Only AI operations that invoke Claude or other LLM APIs consume credits, + which happens at the AI agent layer, not the MCP tool layer. Args: - graph_id (str): Graph database identifier + graph_id (str): format_ (Union[None, Unset, str]): Response format override (json, sse, ndjson) test_mode (Union[Unset, bool]): Enable test mode for debugging Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (MCPToolCall): Request model for MCP tool execution. Raises: @@ -274,8 +259,6 @@ def sync( body=body, format_=format_, test_mode=test_mode, - token=token, - authorization=authorization, ).parsed @@ -286,8 +269,6 @@ async def asyncio_detailed( body: MCPToolCall, format_: Union[None, Unset, str] = UNSET, test_mode: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Execute MCP Tool @@ -323,15 +304,16 @@ async def asyncio_detailed( - `408 Request Timeout`: Tool execution exceeded timeout - Clients should implement exponential backoff on errors - **Note:** - MCP tool calls are included and do not consume credits. + **Credit Model:** + MCP tool execution is included - no credit consumption required. Database + operations (queries, schema inspection, analytics) are completely free. + Only AI operations that invoke Claude or other LLM APIs consume credits, + which happens at the AI agent layer, not the MCP tool layer. Args: - graph_id (str): Graph database identifier + graph_id (str): format_ (Union[None, Unset, str]): Response format override (json, sse, ndjson) test_mode (Union[Unset, bool]): Enable test mode for debugging Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (MCPToolCall): Request model for MCP tool execution. Raises: @@ -347,8 +329,6 @@ async def asyncio_detailed( body=body, format_=format_, test_mode=test_mode, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -363,8 +343,6 @@ async def asyncio( body: MCPToolCall, format_: Union[None, Unset, str] = UNSET, test_mode: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Execute MCP Tool @@ -400,15 +378,16 @@ async def asyncio( - `408 Request Timeout`: Tool execution exceeded timeout - Clients should implement exponential backoff on errors - **Note:** - MCP tool calls are included and do not consume credits. + **Credit Model:** + MCP tool execution is included - no credit consumption required. Database + operations (queries, schema inspection, analytics) are completely free. + Only AI operations that invoke Claude or other LLM APIs consume credits, + which happens at the AI agent layer, not the MCP tool layer. Args: - graph_id (str): Graph database identifier + graph_id (str): format_ (Union[None, Unset, str]): Response format override (json, sse, ndjson) test_mode (Union[Unset, bool]): Enable test mode for debugging Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (MCPToolCall): Request model for MCP tool execution. Raises: @@ -426,7 +405,5 @@ async def asyncio( body=body, format_=format_, test_mode=test_mode, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/mcp/list_mcp_tools.py b/robosystems_client/api/mcp/list_mcp_tools.py index caf43f9..c642ebb 100644 --- a/robosystems_client/api/mcp/list_mcp_tools.py +++ b/robosystems_client/api/mcp/list_mcp_tools.py @@ -8,37 +8,17 @@ from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError from ...models.mcp_tools_response import MCPToolsResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/mcp/tools", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -86,8 +66,6 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, MCPToolsResponse]]: """List MCP Tools @@ -103,14 +81,11 @@ def sync_detailed( - User permissions and subscription tier - Backend capabilities (Kuzu, Neo4j, etc.) - Credit consumption: - - Listing tools is included to encourage exploration - - Tool execution costs vary by operation complexity + **Note:** + MCP tool listing is included - no credit consumption required. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,8 +97,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -137,8 +110,6 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, MCPToolsResponse]]: """List MCP Tools @@ -154,14 +125,11 @@ def sync( - User permissions and subscription tier - Backend capabilities (Kuzu, Neo4j, etc.) - Credit consumption: - - Listing tools is included to encourage exploration - - Tool execution costs vary by operation complexity + **Note:** + MCP tool listing is included - no credit consumption required. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -174,8 +142,6 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -183,8 +149,6 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, MCPToolsResponse]]: """List MCP Tools @@ -200,14 +164,11 @@ async def asyncio_detailed( - User permissions and subscription tier - Backend capabilities (Kuzu, Neo4j, etc.) - Credit consumption: - - Listing tools is included to encourage exploration - - Tool execution costs vary by operation complexity + **Note:** + MCP tool listing is included - no credit consumption required. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -219,8 +180,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -232,8 +191,6 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, MCPToolsResponse]]: """List MCP Tools @@ -249,14 +206,11 @@ async def asyncio( - User permissions and subscription tier - Backend capabilities (Kuzu, Neo4j, etc.) - Credit consumption: - - Listing tools is included to encourage exploration - - Tool execution costs vary by operation complexity + **Note:** + MCP tool listing is included - no credit consumption required. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -270,7 +224,5 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/operations/cancel_operation.py b/robosystems_client/api/operations/cancel_operation.py index c78cfad..f152e96 100644 --- a/robosystems_client/api/operations/cancel_operation.py +++ b/robosystems_client/api/operations/cancel_operation.py @@ -9,37 +9,17 @@ CancelOperationResponseCanceloperation, ) from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( operation_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "delete", "url": f"/v1/operations/{operation_id}", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -93,8 +73,6 @@ def sync_detailed( operation_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, CancelOperationResponseCanceloperation, HTTPValidationError]]: """Cancel Operation @@ -110,8 +88,6 @@ def sync_detailed( Args: operation_id (str): Operation identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -123,8 +99,6 @@ def sync_detailed( kwargs = _get_kwargs( operation_id=operation_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -138,8 +112,6 @@ def sync( operation_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, CancelOperationResponseCanceloperation, HTTPValidationError]]: """Cancel Operation @@ -155,8 +127,6 @@ def sync( Args: operation_id (str): Operation identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -169,8 +139,6 @@ def sync( return sync_detailed( operation_id=operation_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -178,8 +146,6 @@ async def asyncio_detailed( operation_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, CancelOperationResponseCanceloperation, HTTPValidationError]]: """Cancel Operation @@ -195,8 +161,6 @@ async def asyncio_detailed( Args: operation_id (str): Operation identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -208,8 +172,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( operation_id=operation_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -221,8 +183,6 @@ async def asyncio( operation_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, CancelOperationResponseCanceloperation, HTTPValidationError]]: """Cancel Operation @@ -238,8 +198,6 @@ async def asyncio( Args: operation_id (str): Operation identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -253,7 +211,5 @@ async def asyncio( await asyncio_detailed( operation_id=operation_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/operations/get_operation_status.py b/robosystems_client/api/operations/get_operation_status.py index dbfccce..116d66c 100644 --- a/robosystems_client/api/operations/get_operation_status.py +++ b/robosystems_client/api/operations/get_operation_status.py @@ -9,37 +9,17 @@ GetOperationStatusResponseGetoperationstatus, ) from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( operation_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/operations/{operation_id}/status", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -95,8 +75,6 @@ def sync_detailed( operation_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[Any, GetOperationStatusResponseGetoperationstatus, HTTPValidationError] ]: @@ -118,8 +96,6 @@ def sync_detailed( Args: operation_id (str): Operation identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -131,8 +107,6 @@ def sync_detailed( kwargs = _get_kwargs( operation_id=operation_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -146,8 +120,6 @@ def sync( operation_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[Any, GetOperationStatusResponseGetoperationstatus, HTTPValidationError] ]: @@ -169,8 +141,6 @@ def sync( Args: operation_id (str): Operation identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -183,8 +153,6 @@ def sync( return sync_detailed( operation_id=operation_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -192,8 +160,6 @@ async def asyncio_detailed( operation_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[Any, GetOperationStatusResponseGetoperationstatus, HTTPValidationError] ]: @@ -215,8 +181,6 @@ async def asyncio_detailed( Args: operation_id (str): Operation identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -228,8 +192,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( operation_id=operation_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -241,8 +203,6 @@ async def asyncio( operation_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[Any, GetOperationStatusResponseGetoperationstatus, HTTPValidationError] ]: @@ -264,8 +224,6 @@ async def asyncio( Args: operation_id (str): Operation identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -279,7 +237,5 @@ async def asyncio( await asyncio_detailed( operation_id=operation_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/query/execute_cypher_query.py b/robosystems_client/api/query/execute_cypher_query.py index c34a26d..c0d311e 100644 --- a/robosystems_client/api/query/execute_cypher_query.py +++ b/robosystems_client/api/query/execute_cypher_query.py @@ -16,14 +16,10 @@ def _get_kwargs( *, body: CypherQueryRequest, mode: Union[None, ResponseMode, Unset] = UNSET, - chunk_size: Union[Unset, int] = 1000, + chunk_size: Union[None, Unset, int] = UNSET, test_mode: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization params: dict[str, Any] = {} @@ -36,17 +32,15 @@ def _get_kwargs( json_mode = mode params["mode"] = json_mode - params["chunk_size"] = chunk_size + json_chunk_size: Union[None, Unset, int] + if isinstance(chunk_size, Unset): + json_chunk_size = UNSET + else: + json_chunk_size = chunk_size + params["chunk_size"] = json_chunk_size params["test_mode"] = test_mode - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -67,6 +61,12 @@ def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response ) -> Optional[Union[Any, HTTPValidationError]]: if response.status_code == 200: + content_type = response.headers.get("content-type", "") + if ( + "application/x-ndjson" in content_type + or response.headers.get("x-stream-format") == "ndjson" + ): + return None response_200 = response.json() return response_200 @@ -126,12 +126,10 @@ def sync_detailed( client: AuthenticatedClient, body: CypherQueryRequest, mode: Union[None, ResponseMode, Unset] = UNSET, - chunk_size: Union[Unset, int] = 1000, + chunk_size: Union[None, Unset, int] = UNSET, test_mode: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: - """Execute Cypher Query (Read-Only) + r"""Execute Cypher Query (Read-Only) Execute a read-only Cypher query with intelligent response optimization. @@ -141,6 +139,16 @@ def sync_detailed( 1. Create file upload: `POST /v1/graphs/{graph_id}/tables/{table_name}/files` 2. Ingest to graph: `POST /v1/graphs/{graph_id}/tables/ingest` + **Security Best Practice - Use Parameterized Queries:** + ALWAYS use query parameters instead of string interpolation to prevent injection attacks: + - āœ… SAFE: `MATCH (n:Entity {type: $entity_type}) RETURN n` with `parameters: {\"entity_type\": + \"Company\"}` + - āŒ UNSAFE: `MATCH (n:Entity {type: \"Company\"}) RETURN n` with user input concatenated into query + string + + Query parameters provide automatic escaping and type safety. All examples in this API use + parameterized queries. + This endpoint automatically selects the best execution strategy based on: - Query characteristics (size, complexity) - Client capabilities (SSE, NDJSON, JSON) @@ -188,12 +196,10 @@ def sync_detailed( Queue position is based on subscription tier for priority. Args: - graph_id (str): Graph database identifier + graph_id (str): mode (Union[None, ResponseMode, Unset]): Response mode override - chunk_size (Union[Unset, int]): Rows per chunk for streaming Default: 1000. + chunk_size (Union[None, Unset, int]): Rows per chunk for streaming test_mode (Union[Unset, bool]): Enable test mode for better debugging Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (CypherQueryRequest): Request model for Cypher query execution. Raises: @@ -210,8 +216,6 @@ def sync_detailed( mode=mode, chunk_size=chunk_size, test_mode=test_mode, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -227,12 +231,10 @@ def sync( client: AuthenticatedClient, body: CypherQueryRequest, mode: Union[None, ResponseMode, Unset] = UNSET, - chunk_size: Union[Unset, int] = 1000, + chunk_size: Union[None, Unset, int] = UNSET, test_mode: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: - """Execute Cypher Query (Read-Only) + r"""Execute Cypher Query (Read-Only) Execute a read-only Cypher query with intelligent response optimization. @@ -242,6 +244,16 @@ def sync( 1. Create file upload: `POST /v1/graphs/{graph_id}/tables/{table_name}/files` 2. Ingest to graph: `POST /v1/graphs/{graph_id}/tables/ingest` + **Security Best Practice - Use Parameterized Queries:** + ALWAYS use query parameters instead of string interpolation to prevent injection attacks: + - āœ… SAFE: `MATCH (n:Entity {type: $entity_type}) RETURN n` with `parameters: {\"entity_type\": + \"Company\"}` + - āŒ UNSAFE: `MATCH (n:Entity {type: \"Company\"}) RETURN n` with user input concatenated into query + string + + Query parameters provide automatic escaping and type safety. All examples in this API use + parameterized queries. + This endpoint automatically selects the best execution strategy based on: - Query characteristics (size, complexity) - Client capabilities (SSE, NDJSON, JSON) @@ -289,12 +301,10 @@ def sync( Queue position is based on subscription tier for priority. Args: - graph_id (str): Graph database identifier + graph_id (str): mode (Union[None, ResponseMode, Unset]): Response mode override - chunk_size (Union[Unset, int]): Rows per chunk for streaming Default: 1000. + chunk_size (Union[None, Unset, int]): Rows per chunk for streaming test_mode (Union[Unset, bool]): Enable test mode for better debugging Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (CypherQueryRequest): Request model for Cypher query execution. Raises: @@ -312,8 +322,6 @@ def sync( mode=mode, chunk_size=chunk_size, test_mode=test_mode, - token=token, - authorization=authorization, ).parsed @@ -323,12 +331,10 @@ async def asyncio_detailed( client: AuthenticatedClient, body: CypherQueryRequest, mode: Union[None, ResponseMode, Unset] = UNSET, - chunk_size: Union[Unset, int] = 1000, + chunk_size: Union[None, Unset, int] = UNSET, test_mode: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: - """Execute Cypher Query (Read-Only) + r"""Execute Cypher Query (Read-Only) Execute a read-only Cypher query with intelligent response optimization. @@ -338,6 +344,16 @@ async def asyncio_detailed( 1. Create file upload: `POST /v1/graphs/{graph_id}/tables/{table_name}/files` 2. Ingest to graph: `POST /v1/graphs/{graph_id}/tables/ingest` + **Security Best Practice - Use Parameterized Queries:** + ALWAYS use query parameters instead of string interpolation to prevent injection attacks: + - āœ… SAFE: `MATCH (n:Entity {type: $entity_type}) RETURN n` with `parameters: {\"entity_type\": + \"Company\"}` + - āŒ UNSAFE: `MATCH (n:Entity {type: \"Company\"}) RETURN n` with user input concatenated into query + string + + Query parameters provide automatic escaping and type safety. All examples in this API use + parameterized queries. + This endpoint automatically selects the best execution strategy based on: - Query characteristics (size, complexity) - Client capabilities (SSE, NDJSON, JSON) @@ -385,12 +401,10 @@ async def asyncio_detailed( Queue position is based on subscription tier for priority. Args: - graph_id (str): Graph database identifier + graph_id (str): mode (Union[None, ResponseMode, Unset]): Response mode override - chunk_size (Union[Unset, int]): Rows per chunk for streaming Default: 1000. + chunk_size (Union[None, Unset, int]): Rows per chunk for streaming test_mode (Union[Unset, bool]): Enable test mode for better debugging Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (CypherQueryRequest): Request model for Cypher query execution. Raises: @@ -407,8 +421,6 @@ async def asyncio_detailed( mode=mode, chunk_size=chunk_size, test_mode=test_mode, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -422,12 +434,10 @@ async def asyncio( client: AuthenticatedClient, body: CypherQueryRequest, mode: Union[None, ResponseMode, Unset] = UNSET, - chunk_size: Union[Unset, int] = 1000, + chunk_size: Union[None, Unset, int] = UNSET, test_mode: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: - """Execute Cypher Query (Read-Only) + r"""Execute Cypher Query (Read-Only) Execute a read-only Cypher query with intelligent response optimization. @@ -437,6 +447,16 @@ async def asyncio( 1. Create file upload: `POST /v1/graphs/{graph_id}/tables/{table_name}/files` 2. Ingest to graph: `POST /v1/graphs/{graph_id}/tables/ingest` + **Security Best Practice - Use Parameterized Queries:** + ALWAYS use query parameters instead of string interpolation to prevent injection attacks: + - āœ… SAFE: `MATCH (n:Entity {type: $entity_type}) RETURN n` with `parameters: {\"entity_type\": + \"Company\"}` + - āŒ UNSAFE: `MATCH (n:Entity {type: \"Company\"}) RETURN n` with user input concatenated into query + string + + Query parameters provide automatic escaping and type safety. All examples in this API use + parameterized queries. + This endpoint automatically selects the best execution strategy based on: - Query characteristics (size, complexity) - Client capabilities (SSE, NDJSON, JSON) @@ -484,12 +504,10 @@ async def asyncio( Queue position is based on subscription tier for priority. Args: - graph_id (str): Graph database identifier + graph_id (str): mode (Union[None, ResponseMode, Unset]): Response mode override - chunk_size (Union[Unset, int]): Rows per chunk for streaming Default: 1000. + chunk_size (Union[None, Unset, int]): Rows per chunk for streaming test_mode (Union[Unset, bool]): Enable test mode for better debugging Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (CypherQueryRequest): Request model for Cypher query execution. Raises: @@ -508,7 +526,5 @@ async def asyncio( mode=mode, chunk_size=chunk_size, test_mode=test_mode, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/schema/export_graph_schema.py b/robosystems_client/api/schema/export_graph_schema.py index 47c751c..a2332e6 100644 --- a/robosystems_client/api/schema/export_graph_schema.py +++ b/robosystems_client/api/schema/export_graph_schema.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any, Optional, Union, cast import httpx @@ -15,26 +15,13 @@ def _get_kwargs( *, format_: Union[Unset, str] = "json", include_data_stats: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - params: dict[str, Any] = {} params["format"] = format_ params["include_data_stats"] = include_data_stats - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -43,23 +30,34 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[HTTPValidationError, SchemaExportResponse]]: +) -> Optional[Union[Any, HTTPValidationError, SchemaExportResponse]]: if response.status_code == 200: response_200 = SchemaExportResponse.from_dict(response.json()) return response_200 + if response.status_code == 403: + response_403 = cast(Any, None) + return response_403 + + if response.status_code == 404: + response_404 = cast(Any, None) + return response_404 + if response.status_code == 422: response_422 = HTTPValidationError.from_dict(response.json()) return response_422 + if response.status_code == 500: + response_500 = cast(Any, None) + return response_500 + if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -68,7 +66,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[HTTPValidationError, SchemaExportResponse]]: +) -> Response[Union[Any, HTTPValidationError, SchemaExportResponse]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -83,35 +81,75 @@ def sync_detailed( client: AuthenticatedClient, format_: Union[Unset, str] = "json", include_data_stats: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[HTTPValidationError, SchemaExportResponse]]: - """Export Graph Schema +) -> Response[Union[Any, HTTPValidationError, SchemaExportResponse]]: + """Export Declared Graph Schema + + Export the declared schema definition of an existing graph. + + ## What This Returns + + This endpoint returns the **original schema definition** that was used to create the graph: + - The schema as it was **declared** during graph creation + - Complete node and relationship definitions + - Property types and constraints + - Schema metadata (name, version, type) + + ## Runtime vs Declared Schema + + **Use this endpoint** (`/schema/export`) when you need: + - The original schema definition used to create the graph + - Schema in a specific format (JSON, YAML, Cypher DDL) + - Schema for documentation or version control + - Schema to replicate in another graph + + **Use `/schema` instead** when you need: + - What data is ACTUALLY in the database right now + - What properties exist on real nodes (discovered from data) + - Current runtime database structure for querying + + ## Export Formats + + ### JSON Format (`format=json`) + Returns structured JSON with nodes, relationships, and properties. + Best for programmatic access and API integration. + + ### YAML Format (`format=yaml`) + Returns human-readable YAML with comments. + Best for documentation and configuration management. - Export the schema of an existing graph in JSON, YAML, or Cypher format + ### Cypher DDL Format (`format=cypher`) + Returns Cypher CREATE statements for recreating the schema. + Best for database migration and replication. + + ## Data Statistics + + Set `include_data_stats=true` to include: + - Node counts by label + - Relationship counts by type + - Total nodes and relationships + + This combines declared schema with runtime statistics. + + This operation is included - no credit consumption required. Args: - graph_id (str): The graph ID to export schema from + graph_id (str): format_ (Union[Unset, str]): Export format: json, yaml, or cypher Default: 'json'. include_data_stats (Union[Unset, bool]): Include statistics about actual data in the graph - Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + (node counts, relationship counts) Default: False. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[HTTPValidationError, SchemaExportResponse]] + Response[Union[Any, HTTPValidationError, SchemaExportResponse]] """ kwargs = _get_kwargs( graph_id=graph_id, format_=format_, include_data_stats=include_data_stats, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -127,27 +165,69 @@ def sync( client: AuthenticatedClient, format_: Union[Unset, str] = "json", include_data_stats: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[HTTPValidationError, SchemaExportResponse]]: - """Export Graph Schema +) -> Optional[Union[Any, HTTPValidationError, SchemaExportResponse]]: + """Export Declared Graph Schema + + Export the declared schema definition of an existing graph. + + ## What This Returns + + This endpoint returns the **original schema definition** that was used to create the graph: + - The schema as it was **declared** during graph creation + - Complete node and relationship definitions + - Property types and constraints + - Schema metadata (name, version, type) + + ## Runtime vs Declared Schema + + **Use this endpoint** (`/schema/export`) when you need: + - The original schema definition used to create the graph + - Schema in a specific format (JSON, YAML, Cypher DDL) + - Schema for documentation or version control + - Schema to replicate in another graph + + **Use `/schema` instead** when you need: + - What data is ACTUALLY in the database right now + - What properties exist on real nodes (discovered from data) + - Current runtime database structure for querying + + ## Export Formats + + ### JSON Format (`format=json`) + Returns structured JSON with nodes, relationships, and properties. + Best for programmatic access and API integration. + + ### YAML Format (`format=yaml`) + Returns human-readable YAML with comments. + Best for documentation and configuration management. + + ### Cypher DDL Format (`format=cypher`) + Returns Cypher CREATE statements for recreating the schema. + Best for database migration and replication. - Export the schema of an existing graph in JSON, YAML, or Cypher format + ## Data Statistics + + Set `include_data_stats=true` to include: + - Node counts by label + - Relationship counts by type + - Total nodes and relationships + + This combines declared schema with runtime statistics. + + This operation is included - no credit consumption required. Args: - graph_id (str): The graph ID to export schema from + graph_id (str): format_ (Union[Unset, str]): Export format: json, yaml, or cypher Default: 'json'. include_data_stats (Union[Unset, bool]): Include statistics about actual data in the graph - Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + (node counts, relationship counts) Default: False. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[HTTPValidationError, SchemaExportResponse] + Union[Any, HTTPValidationError, SchemaExportResponse] """ return sync_detailed( @@ -155,8 +235,6 @@ def sync( client=client, format_=format_, include_data_stats=include_data_stats, - token=token, - authorization=authorization, ).parsed @@ -166,35 +244,75 @@ async def asyncio_detailed( client: AuthenticatedClient, format_: Union[Unset, str] = "json", include_data_stats: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[HTTPValidationError, SchemaExportResponse]]: - """Export Graph Schema +) -> Response[Union[Any, HTTPValidationError, SchemaExportResponse]]: + """Export Declared Graph Schema + + Export the declared schema definition of an existing graph. + + ## What This Returns + + This endpoint returns the **original schema definition** that was used to create the graph: + - The schema as it was **declared** during graph creation + - Complete node and relationship definitions + - Property types and constraints + - Schema metadata (name, version, type) + + ## Runtime vs Declared Schema + + **Use this endpoint** (`/schema/export`) when you need: + - The original schema definition used to create the graph + - Schema in a specific format (JSON, YAML, Cypher DDL) + - Schema for documentation or version control + - Schema to replicate in another graph + + **Use `/schema` instead** when you need: + - What data is ACTUALLY in the database right now + - What properties exist on real nodes (discovered from data) + - Current runtime database structure for querying + + ## Export Formats + + ### JSON Format (`format=json`) + Returns structured JSON with nodes, relationships, and properties. + Best for programmatic access and API integration. + + ### YAML Format (`format=yaml`) + Returns human-readable YAML with comments. + Best for documentation and configuration management. + + ### Cypher DDL Format (`format=cypher`) + Returns Cypher CREATE statements for recreating the schema. + Best for database migration and replication. + + ## Data Statistics + + Set `include_data_stats=true` to include: + - Node counts by label + - Relationship counts by type + - Total nodes and relationships - Export the schema of an existing graph in JSON, YAML, or Cypher format + This combines declared schema with runtime statistics. + + This operation is included - no credit consumption required. Args: - graph_id (str): The graph ID to export schema from + graph_id (str): format_ (Union[Unset, str]): Export format: json, yaml, or cypher Default: 'json'. include_data_stats (Union[Unset, bool]): Include statistics about actual data in the graph - Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + (node counts, relationship counts) Default: False. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[HTTPValidationError, SchemaExportResponse]] + Response[Union[Any, HTTPValidationError, SchemaExportResponse]] """ kwargs = _get_kwargs( graph_id=graph_id, format_=format_, include_data_stats=include_data_stats, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -208,27 +326,69 @@ async def asyncio( client: AuthenticatedClient, format_: Union[Unset, str] = "json", include_data_stats: Union[Unset, bool] = False, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[HTTPValidationError, SchemaExportResponse]]: - """Export Graph Schema +) -> Optional[Union[Any, HTTPValidationError, SchemaExportResponse]]: + """Export Declared Graph Schema + + Export the declared schema definition of an existing graph. + + ## What This Returns + + This endpoint returns the **original schema definition** that was used to create the graph: + - The schema as it was **declared** during graph creation + - Complete node and relationship definitions + - Property types and constraints + - Schema metadata (name, version, type) + + ## Runtime vs Declared Schema + + **Use this endpoint** (`/schema/export`) when you need: + - The original schema definition used to create the graph + - Schema in a specific format (JSON, YAML, Cypher DDL) + - Schema for documentation or version control + - Schema to replicate in another graph + + **Use `/schema` instead** when you need: + - What data is ACTUALLY in the database right now + - What properties exist on real nodes (discovered from data) + - Current runtime database structure for querying + + ## Export Formats + + ### JSON Format (`format=json`) + Returns structured JSON with nodes, relationships, and properties. + Best for programmatic access and API integration. + + ### YAML Format (`format=yaml`) + Returns human-readable YAML with comments. + Best for documentation and configuration management. + + ### Cypher DDL Format (`format=cypher`) + Returns Cypher CREATE statements for recreating the schema. + Best for database migration and replication. + + ## Data Statistics + + Set `include_data_stats=true` to include: + - Node counts by label + - Relationship counts by type + - Total nodes and relationships + + This combines declared schema with runtime statistics. - Export the schema of an existing graph in JSON, YAML, or Cypher format + This operation is included - no credit consumption required. Args: - graph_id (str): The graph ID to export schema from + graph_id (str): format_ (Union[Unset, str]): Export format: json, yaml, or cypher Default: 'json'. include_data_stats (Union[Unset, bool]): Include statistics about actual data in the graph - Default: False. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + (node counts, relationship counts) Default: False. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[HTTPValidationError, SchemaExportResponse] + Union[Any, HTTPValidationError, SchemaExportResponse] """ return ( @@ -237,7 +397,5 @@ async def asyncio( client=client, format_=format_, include_data_stats=include_data_stats, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/schema/get_graph_schema.py b/robosystems_client/api/schema/get_graph_schema.py index 32d5837..bef70d4 100644 --- a/robosystems_client/api/schema/get_graph_schema.py +++ b/robosystems_client/api/schema/get_graph_schema.py @@ -5,49 +5,27 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.get_graph_schema_response_getgraphschema import ( - GetGraphSchemaResponseGetgraphschema, -) from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...models.schema_info_response import SchemaInfoResponse +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/schema", - "params": params, } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, GetGraphSchemaResponseGetgraphschema, HTTPValidationError]]: +) -> Optional[Union[Any, HTTPValidationError, SchemaInfoResponse]]: if response.status_code == 200: - response_200 = GetGraphSchemaResponseGetgraphschema.from_dict(response.json()) + response_200 = SchemaInfoResponse.from_dict(response.json()) return response_200 @@ -64,6 +42,10 @@ def _parse_response( response_500 = cast(Any, None) return response_500 + if response.status_code == 504: + response_504 = cast(Any, None) + return response_504 + if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -72,7 +54,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, GetGraphSchemaResponseGetgraphschema, HTTPValidationError]]: +) -> Response[Union[Any, HTTPValidationError, SchemaInfoResponse]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -85,40 +67,59 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, GetGraphSchemaResponseGetgraphschema, HTTPValidationError]]: +) -> Response[Union[Any, HTTPValidationError, SchemaInfoResponse]]: """Get Runtime Graph Schema Get runtime schema information for the specified graph database. - This endpoint inspects the actual graph database structure and returns: + ## What This Returns + + This endpoint inspects the **actual current state** of the graph database and returns: - **Node Labels**: All node types currently in the database - **Relationship Types**: All relationship types currently in the database - - **Node Properties**: Properties for each node type (limited to first 10 for performance) + - **Node Properties**: Properties discovered from actual data (up to 10 properties per node type) + + ## Runtime vs Declared Schema - This shows what actually exists in the database right now - the runtime state. - For the declared schema definition, use GET /schema/export instead. + **Use this endpoint** (`/schema`) when you need to know: + - What data is ACTUALLY in the database right now + - What properties exist on real nodes + - What relationships have been created + - Current database structure for querying + + **Use `/schema/export` instead** when you need: + - The original schema definition used to create the graph + - Schema in a specific format (JSON, YAML, Cypher DDL) + - Schema for documentation or version control + - Schema to replicate in another graph + + ## Example Use Cases + + - **Building queries**: See what node labels and properties exist to write accurate Cypher + - **Data exploration**: Discover what's in an unfamiliar graph + - **Schema drift detection**: Compare runtime vs declared schema + - **API integration**: Dynamically adapt to current graph structure + + ## Performance Note + + Property discovery is limited to 10 properties per node type for performance. + For complete schema definitions, use `/schema/export`. This operation is included - no credit consumption required. Args: - graph_id (str): The graph database to get schema for - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, GetGraphSchemaResponseGetgraphschema, HTTPValidationError]] + Response[Union[Any, HTTPValidationError, SchemaInfoResponse]] """ kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -132,41 +133,60 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, GetGraphSchemaResponseGetgraphschema, HTTPValidationError]]: +) -> Optional[Union[Any, HTTPValidationError, SchemaInfoResponse]]: """Get Runtime Graph Schema Get runtime schema information for the specified graph database. - This endpoint inspects the actual graph database structure and returns: + ## What This Returns + + This endpoint inspects the **actual current state** of the graph database and returns: - **Node Labels**: All node types currently in the database - **Relationship Types**: All relationship types currently in the database - - **Node Properties**: Properties for each node type (limited to first 10 for performance) + - **Node Properties**: Properties discovered from actual data (up to 10 properties per node type) + + ## Runtime vs Declared Schema + + **Use this endpoint** (`/schema`) when you need to know: + - What data is ACTUALLY in the database right now + - What properties exist on real nodes + - What relationships have been created + - Current database structure for querying + + **Use `/schema/export` instead** when you need: + - The original schema definition used to create the graph + - Schema in a specific format (JSON, YAML, Cypher DDL) + - Schema for documentation or version control + - Schema to replicate in another graph - This shows what actually exists in the database right now - the runtime state. - For the declared schema definition, use GET /schema/export instead. + ## Example Use Cases + + - **Building queries**: See what node labels and properties exist to write accurate Cypher + - **Data exploration**: Discover what's in an unfamiliar graph + - **Schema drift detection**: Compare runtime vs declared schema + - **API integration**: Dynamically adapt to current graph structure + + ## Performance Note + + Property discovery is limited to 10 properties per node type for performance. + For complete schema definitions, use `/schema/export`. This operation is included - no credit consumption required. Args: - graph_id (str): The graph database to get schema for - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, GetGraphSchemaResponseGetgraphschema, HTTPValidationError] + Union[Any, HTTPValidationError, SchemaInfoResponse] """ return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -174,40 +194,59 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, GetGraphSchemaResponseGetgraphschema, HTTPValidationError]]: +) -> Response[Union[Any, HTTPValidationError, SchemaInfoResponse]]: """Get Runtime Graph Schema Get runtime schema information for the specified graph database. - This endpoint inspects the actual graph database structure and returns: + ## What This Returns + + This endpoint inspects the **actual current state** of the graph database and returns: - **Node Labels**: All node types currently in the database - **Relationship Types**: All relationship types currently in the database - - **Node Properties**: Properties for each node type (limited to first 10 for performance) + - **Node Properties**: Properties discovered from actual data (up to 10 properties per node type) + + ## Runtime vs Declared Schema + + **Use this endpoint** (`/schema`) when you need to know: + - What data is ACTUALLY in the database right now + - What properties exist on real nodes + - What relationships have been created + - Current database structure for querying + + **Use `/schema/export` instead** when you need: + - The original schema definition used to create the graph + - Schema in a specific format (JSON, YAML, Cypher DDL) + - Schema for documentation or version control + - Schema to replicate in another graph + + ## Example Use Cases + + - **Building queries**: See what node labels and properties exist to write accurate Cypher + - **Data exploration**: Discover what's in an unfamiliar graph + - **Schema drift detection**: Compare runtime vs declared schema + - **API integration**: Dynamically adapt to current graph structure - This shows what actually exists in the database right now - the runtime state. - For the declared schema definition, use GET /schema/export instead. + ## Performance Note + + Property discovery is limited to 10 properties per node type for performance. + For complete schema definitions, use `/schema/export`. This operation is included - no credit consumption required. Args: - graph_id (str): The graph database to get schema for - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, GetGraphSchemaResponseGetgraphschema, HTTPValidationError]] + Response[Union[Any, HTTPValidationError, SchemaInfoResponse]] """ kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -219,41 +258,60 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, GetGraphSchemaResponseGetgraphschema, HTTPValidationError]]: +) -> Optional[Union[Any, HTTPValidationError, SchemaInfoResponse]]: """Get Runtime Graph Schema Get runtime schema information for the specified graph database. - This endpoint inspects the actual graph database structure and returns: + ## What This Returns + + This endpoint inspects the **actual current state** of the graph database and returns: - **Node Labels**: All node types currently in the database - **Relationship Types**: All relationship types currently in the database - - **Node Properties**: Properties for each node type (limited to first 10 for performance) + - **Node Properties**: Properties discovered from actual data (up to 10 properties per node type) + + ## Runtime vs Declared Schema + + **Use this endpoint** (`/schema`) when you need to know: + - What data is ACTUALLY in the database right now + - What properties exist on real nodes + - What relationships have been created + - Current database structure for querying + + **Use `/schema/export` instead** when you need: + - The original schema definition used to create the graph + - Schema in a specific format (JSON, YAML, Cypher DDL) + - Schema for documentation or version control + - Schema to replicate in another graph + + ## Example Use Cases + + - **Building queries**: See what node labels and properties exist to write accurate Cypher + - **Data exploration**: Discover what's in an unfamiliar graph + - **Schema drift detection**: Compare runtime vs declared schema + - **API integration**: Dynamically adapt to current graph structure + + ## Performance Note - This shows what actually exists in the database right now - the runtime state. - For the declared schema definition, use GET /schema/export instead. + Property discovery is limited to 10 properties per node type for performance. + For complete schema definitions, use `/schema/export`. This operation is included - no credit consumption required. Args: - graph_id (str): The graph database to get schema for - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, GetGraphSchemaResponseGetgraphschema, HTTPValidationError] + Union[Any, HTTPValidationError, SchemaInfoResponse] """ return ( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/schema/validate_schema.py b/robosystems_client/api/schema/validate_schema.py index 453ae7b..1e774b7 100644 --- a/robosystems_client/api/schema/validate_schema.py +++ b/robosystems_client/api/schema/validate_schema.py @@ -8,35 +8,19 @@ from ...models.error_response import ErrorResponse from ...models.schema_validation_request import SchemaValidationRequest from ...models.schema_validation_response import SchemaValidationResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, *, body: SchemaValidationRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/schema/validate", - "params": params, } _kwargs["json"] = body.to_dict() @@ -97,8 +81,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: SchemaValidationRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, SchemaValidationResponse]]: """Validate Schema @@ -126,9 +108,7 @@ def sync_detailed( This operation is included - no credit consumption required. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (SchemaValidationRequest): Request model for schema validation. Raises: @@ -142,8 +122,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -158,8 +136,6 @@ def sync( *, client: AuthenticatedClient, body: SchemaValidationRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, SchemaValidationResponse]]: """Validate Schema @@ -187,9 +163,7 @@ def sync( This operation is included - no credit consumption required. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (SchemaValidationRequest): Request model for schema validation. Raises: @@ -204,8 +178,6 @@ def sync( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -214,8 +186,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: SchemaValidationRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, SchemaValidationResponse]]: """Validate Schema @@ -243,9 +213,7 @@ async def asyncio_detailed( This operation is included - no credit consumption required. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (SchemaValidationRequest): Request model for schema validation. Raises: @@ -259,8 +227,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -273,8 +239,6 @@ async def asyncio( *, client: AuthenticatedClient, body: SchemaValidationRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, SchemaValidationResponse]]: """Validate Schema @@ -302,9 +266,7 @@ async def asyncio( This operation is included - no credit consumption required. Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (SchemaValidationRequest): Request model for schema validation. Raises: @@ -320,7 +282,5 @@ async def asyncio( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/subgraphs/create_subgraph.py b/robosystems_client/api/subgraphs/create_subgraph.py index 038127c..f615b6d 100644 --- a/robosystems_client/api/subgraphs/create_subgraph.py +++ b/robosystems_client/api/subgraphs/create_subgraph.py @@ -8,35 +8,19 @@ from ...models.create_subgraph_request import CreateSubgraphRequest from ...models.http_validation_error import HTTPValidationError from ...models.subgraph_response import SubgraphResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, *, body: CreateSubgraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/subgraphs", - "params": params, } _kwargs["json"] = body.to_dict() @@ -82,8 +66,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: CreateSubgraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, SubgraphResponse]]: """Create Subgraph @@ -101,9 +83,7 @@ def sync_detailed( - Created subgraph details including its unique ID Args: - graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (CreateSubgraphRequest): Request model for creating a subgraph. Raises: @@ -117,8 +97,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -133,8 +111,6 @@ def sync( *, client: AuthenticatedClient, body: CreateSubgraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, SubgraphResponse]]: """Create Subgraph @@ -152,9 +128,7 @@ def sync( - Created subgraph details including its unique ID Args: - graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (CreateSubgraphRequest): Request model for creating a subgraph. Raises: @@ -169,8 +143,6 @@ def sync( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -179,8 +151,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: CreateSubgraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, SubgraphResponse]]: """Create Subgraph @@ -198,9 +168,7 @@ async def asyncio_detailed( - Created subgraph details including its unique ID Args: - graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (CreateSubgraphRequest): Request model for creating a subgraph. Raises: @@ -214,8 +182,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -228,8 +194,6 @@ async def asyncio( *, client: AuthenticatedClient, body: CreateSubgraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, SubgraphResponse]]: """Create Subgraph @@ -247,9 +211,7 @@ async def asyncio( - Created subgraph details including its unique ID Args: - graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (CreateSubgraphRequest): Request model for creating a subgraph. Raises: @@ -265,7 +227,5 @@ async def asyncio( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/subgraphs/delete_subgraph.py b/robosystems_client/api/subgraphs/delete_subgraph.py index c862458..3cbb1a8 100644 --- a/robosystems_client/api/subgraphs/delete_subgraph.py +++ b/robosystems_client/api/subgraphs/delete_subgraph.py @@ -8,7 +8,7 @@ from ...models.delete_subgraph_request import DeleteSubgraphRequest from ...models.delete_subgraph_response import DeleteSubgraphResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( @@ -16,28 +16,12 @@ def _get_kwargs( subgraph_id: str, *, body: DeleteSubgraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "delete", "url": f"/v1/graphs/{graph_id}/subgraphs/{subgraph_id}", - "params": params, } _kwargs["json"] = body.to_dict() @@ -108,8 +92,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: DeleteSubgraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]: """Delete Subgraph @@ -133,10 +115,8 @@ def sync_detailed( `s3://robosystems-backups/{instance_id}/{database_name}_{timestamp}.backup` Args: - graph_id (str): Parent graph identifier + graph_id (str): subgraph_id (str): Subgraph identifier to delete - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (DeleteSubgraphRequest): Request model for deleting a subgraph. Raises: @@ -151,8 +131,6 @@ def sync_detailed( graph_id=graph_id, subgraph_id=subgraph_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -168,8 +146,6 @@ def sync( *, client: AuthenticatedClient, body: DeleteSubgraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]: """Delete Subgraph @@ -193,10 +169,8 @@ def sync( `s3://robosystems-backups/{instance_id}/{database_name}_{timestamp}.backup` Args: - graph_id (str): Parent graph identifier + graph_id (str): subgraph_id (str): Subgraph identifier to delete - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (DeleteSubgraphRequest): Request model for deleting a subgraph. Raises: @@ -212,8 +186,6 @@ def sync( subgraph_id=subgraph_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -223,8 +195,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: DeleteSubgraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]: """Delete Subgraph @@ -248,10 +218,8 @@ async def asyncio_detailed( `s3://robosystems-backups/{instance_id}/{database_name}_{timestamp}.backup` Args: - graph_id (str): Parent graph identifier + graph_id (str): subgraph_id (str): Subgraph identifier to delete - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (DeleteSubgraphRequest): Request model for deleting a subgraph. Raises: @@ -266,8 +234,6 @@ async def asyncio_detailed( graph_id=graph_id, subgraph_id=subgraph_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -281,8 +247,6 @@ async def asyncio( *, client: AuthenticatedClient, body: DeleteSubgraphRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]: """Delete Subgraph @@ -306,10 +270,8 @@ async def asyncio( `s3://robosystems-backups/{instance_id}/{database_name}_{timestamp}.backup` Args: - graph_id (str): Parent graph identifier + graph_id (str): subgraph_id (str): Subgraph identifier to delete - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (DeleteSubgraphRequest): Request model for deleting a subgraph. Raises: @@ -326,7 +288,5 @@ async def asyncio( subgraph_id=subgraph_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/subgraphs/get_subgraph_info.py b/robosystems_client/api/subgraphs/get_subgraph_info.py index e3753f3..937b889 100644 --- a/robosystems_client/api/subgraphs/get_subgraph_info.py +++ b/robosystems_client/api/subgraphs/get_subgraph_info.py @@ -7,38 +7,18 @@ from ...client import AuthenticatedClient, Client from ...models.http_validation_error import HTTPValidationError from ...models.subgraph_response import SubgraphResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, subgraph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/subgraphs/{subgraph_id}/info", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -97,8 +77,6 @@ def sync_detailed( subgraph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, SubgraphResponse]]: """Get Subgraph Details @@ -123,10 +101,8 @@ def sync_detailed( - Schema information Args: - graph_id (str): Parent graph identifier + graph_id (str): subgraph_id (str): Subgraph identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -139,8 +115,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, subgraph_id=subgraph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -155,8 +129,6 @@ def sync( subgraph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, SubgraphResponse]]: """Get Subgraph Details @@ -181,10 +153,8 @@ def sync( - Schema information Args: - graph_id (str): Parent graph identifier + graph_id (str): subgraph_id (str): Subgraph identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -198,8 +168,6 @@ def sync( graph_id=graph_id, subgraph_id=subgraph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -208,8 +176,6 @@ async def asyncio_detailed( subgraph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, SubgraphResponse]]: """Get Subgraph Details @@ -234,10 +200,8 @@ async def asyncio_detailed( - Schema information Args: - graph_id (str): Parent graph identifier + graph_id (str): subgraph_id (str): Subgraph identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -250,8 +214,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, subgraph_id=subgraph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -264,8 +226,6 @@ async def asyncio( subgraph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, SubgraphResponse]]: """Get Subgraph Details @@ -290,10 +250,8 @@ async def asyncio( - Schema information Args: - graph_id (str): Parent graph identifier + graph_id (str): subgraph_id (str): Subgraph identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -308,7 +266,5 @@ async def asyncio( graph_id=graph_id, subgraph_id=subgraph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/subgraphs/get_subgraph_quota.py b/robosystems_client/api/subgraphs/get_subgraph_quota.py index 957b13b..0d8cd2b 100644 --- a/robosystems_client/api/subgraphs/get_subgraph_quota.py +++ b/robosystems_client/api/subgraphs/get_subgraph_quota.py @@ -7,37 +7,17 @@ from ...client import AuthenticatedClient, Client from ...models.http_validation_error import HTTPValidationError from ...models.subgraph_quota_response import SubgraphQuotaResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/subgraphs/quota", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -91,8 +71,6 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, SubgraphQuotaResponse]]: """Get Subgraph Quota @@ -115,9 +93,7 @@ def sync_detailed( Individual subgraph sizes shown in list endpoint. Args: - graph_id (str): Parent graph identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -129,8 +105,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -144,8 +118,6 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, SubgraphQuotaResponse]]: """Get Subgraph Quota @@ -168,9 +140,7 @@ def sync( Individual subgraph sizes shown in list endpoint. Args: - graph_id (str): Parent graph identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -183,8 +153,6 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -192,8 +160,6 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, SubgraphQuotaResponse]]: """Get Subgraph Quota @@ -216,9 +182,7 @@ async def asyncio_detailed( Individual subgraph sizes shown in list endpoint. Args: - graph_id (str): Parent graph identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -230,8 +194,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -243,8 +205,6 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, SubgraphQuotaResponse]]: """Get Subgraph Quota @@ -267,9 +227,7 @@ async def asyncio( Individual subgraph sizes shown in list endpoint. Args: - graph_id (str): Parent graph identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -283,7 +241,5 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/subgraphs/list_subgraphs.py b/robosystems_client/api/subgraphs/list_subgraphs.py index 4c36721..7e06b09 100644 --- a/robosystems_client/api/subgraphs/list_subgraphs.py +++ b/robosystems_client/api/subgraphs/list_subgraphs.py @@ -7,37 +7,17 @@ from ...client import AuthenticatedClient, Client from ...models.http_validation_error import HTTPValidationError from ...models.list_subgraphs_response import ListSubgraphsResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/subgraphs", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -75,8 +55,6 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, ListSubgraphsResponse]]: """List Subgraphs @@ -92,9 +70,7 @@ def sync_detailed( - Each subgraph includes its ID, name, description, type, status, and creation date Args: - graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -106,8 +82,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -121,8 +95,6 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, ListSubgraphsResponse]]: """List Subgraphs @@ -138,9 +110,7 @@ def sync( - Each subgraph includes its ID, name, description, type, status, and creation date Args: - graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -153,8 +123,6 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -162,8 +130,6 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, ListSubgraphsResponse]]: """List Subgraphs @@ -179,9 +145,7 @@ async def asyncio_detailed( - Each subgraph includes its ID, name, description, type, status, and creation date Args: - graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -193,8 +157,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -206,8 +168,6 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, ListSubgraphsResponse]]: """List Subgraphs @@ -223,9 +183,7 @@ async def asyncio( - Each subgraph includes its ID, name, description, type, status, and creation date Args: - graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -239,7 +197,5 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/tables/delete_file.py b/robosystems_client/api/tables/delete_file.py index 408f86a..e50096f 100644 --- a/robosystems_client/api/tables/delete_file.py +++ b/robosystems_client/api/tables/delete_file.py @@ -8,38 +8,18 @@ from ...models.delete_file_response import DeleteFileResponse from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, file_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "delete", "url": f"/v1/graphs/{graph_id}/tables/files/{file_id}", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -96,81 +76,56 @@ def sync_detailed( file_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, DeleteFileResponse, ErrorResponse, HTTPValidationError]]: - r""" Delete File from Staging - - Delete a file from S3 storage and database tracking. - - **Purpose:** - Remove unwanted, duplicate, or incorrect files from staging tables before ingestion. - The file is deleted from both S3 and database tracking, and table statistics - are automatically recalculated. - - **Use Cases:** - - Remove duplicate uploads - - Delete files with incorrect data - - Clean up failed uploads - - Fix data quality issues before ingestion - - Manage storage usage - - **What Happens:** - 1. File deleted from S3 storage - 2. Database tracking record removed - 3. Table statistics recalculated (file count, size, row count) - 4. DuckDB automatically excludes file from future queries - - **Security:** - - Write access required (verified via auth) - - Shared repositories block file deletions - - Full audit trail of deletion operations - - Cannot delete after ingestion to graph - - **Example Response:** - ```json - { - \"status\": \"deleted\", - \"file_id\": \"f123\", - \"file_name\": \"entities_batch1.parquet\", - \"message\": \"File deleted successfully. DuckDB will automatically exclude it from queries.\" - } - ``` - - **Example Usage:** - ```bash - curl -X DELETE -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123 - ``` - - **Tips:** - - Delete files before ingestion for best results - - Table statistics update automatically - - No need to refresh DuckDB - exclusion is automatic - - Consider re-uploading corrected version after deletion - - **Note:** - File deletion is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - file_id (str): File ID - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, DeleteFileResponse, ErrorResponse, HTTPValidationError]] - """ + """Delete File from Staging + + Delete a file from S3 storage and database tracking. + + Remove unwanted, duplicate, or incorrect files from staging tables before ingestion. + The file is deleted from both S3 and database tracking, and table statistics + are automatically recalculated. + + **Use Cases:** + - Remove duplicate uploads + - Delete files with incorrect data + - Clean up failed uploads + - Fix data quality issues before ingestion + - Manage storage usage + + **What Happens:** + 1. File deleted from S3 storage + 2. Database tracking record removed + 3. Table statistics recalculated (file count, size, row count) + 4. DuckDB automatically excludes file from future queries + + **Security:** + - Write access required (verified via auth) + - Shared repositories block file deletions + - Full audit trail of deletion operations + - Cannot delete after ingestion to graph + + **Important Notes:** + - Delete files before ingestion for best results + - Table statistics update automatically + - No need to refresh DuckDB - exclusion is automatic + - Consider re-uploading corrected version after deletion + - File deletion is included - no credit consumption + + Args: + graph_id (str): + file_id (str): File ID + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DeleteFileResponse, ErrorResponse, HTTPValidationError]] + """ kwargs = _get_kwargs( graph_id=graph_id, file_id=file_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -185,82 +140,57 @@ def sync( file_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, DeleteFileResponse, ErrorResponse, HTTPValidationError]]: - r""" Delete File from Staging - - Delete a file from S3 storage and database tracking. - - **Purpose:** - Remove unwanted, duplicate, or incorrect files from staging tables before ingestion. - The file is deleted from both S3 and database tracking, and table statistics - are automatically recalculated. - - **Use Cases:** - - Remove duplicate uploads - - Delete files with incorrect data - - Clean up failed uploads - - Fix data quality issues before ingestion - - Manage storage usage - - **What Happens:** - 1. File deleted from S3 storage - 2. Database tracking record removed - 3. Table statistics recalculated (file count, size, row count) - 4. DuckDB automatically excludes file from future queries - - **Security:** - - Write access required (verified via auth) - - Shared repositories block file deletions - - Full audit trail of deletion operations - - Cannot delete after ingestion to graph - - **Example Response:** - ```json - { - \"status\": \"deleted\", - \"file_id\": \"f123\", - \"file_name\": \"entities_batch1.parquet\", - \"message\": \"File deleted successfully. DuckDB will automatically exclude it from queries.\" - } - ``` - - **Example Usage:** - ```bash - curl -X DELETE -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123 - ``` - - **Tips:** - - Delete files before ingestion for best results - - Table statistics update automatically - - No need to refresh DuckDB - exclusion is automatic - - Consider re-uploading corrected version after deletion - - **Note:** - File deletion is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - file_id (str): File ID - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, DeleteFileResponse, ErrorResponse, HTTPValidationError] - """ + """Delete File from Staging + + Delete a file from S3 storage and database tracking. + + Remove unwanted, duplicate, or incorrect files from staging tables before ingestion. + The file is deleted from both S3 and database tracking, and table statistics + are automatically recalculated. + + **Use Cases:** + - Remove duplicate uploads + - Delete files with incorrect data + - Clean up failed uploads + - Fix data quality issues before ingestion + - Manage storage usage + + **What Happens:** + 1. File deleted from S3 storage + 2. Database tracking record removed + 3. Table statistics recalculated (file count, size, row count) + 4. DuckDB automatically excludes file from future queries + + **Security:** + - Write access required (verified via auth) + - Shared repositories block file deletions + - Full audit trail of deletion operations + - Cannot delete after ingestion to graph + + **Important Notes:** + - Delete files before ingestion for best results + - Table statistics update automatically + - No need to refresh DuckDB - exclusion is automatic + - Consider re-uploading corrected version after deletion + - File deletion is included - no credit consumption + + Args: + graph_id (str): + file_id (str): File ID + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DeleteFileResponse, ErrorResponse, HTTPValidationError] + """ return sync_detailed( graph_id=graph_id, file_id=file_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -269,81 +199,56 @@ async def asyncio_detailed( file_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, DeleteFileResponse, ErrorResponse, HTTPValidationError]]: - r""" Delete File from Staging - - Delete a file from S3 storage and database tracking. - - **Purpose:** - Remove unwanted, duplicate, or incorrect files from staging tables before ingestion. - The file is deleted from both S3 and database tracking, and table statistics - are automatically recalculated. - - **Use Cases:** - - Remove duplicate uploads - - Delete files with incorrect data - - Clean up failed uploads - - Fix data quality issues before ingestion - - Manage storage usage - - **What Happens:** - 1. File deleted from S3 storage - 2. Database tracking record removed - 3. Table statistics recalculated (file count, size, row count) - 4. DuckDB automatically excludes file from future queries - - **Security:** - - Write access required (verified via auth) - - Shared repositories block file deletions - - Full audit trail of deletion operations - - Cannot delete after ingestion to graph - - **Example Response:** - ```json - { - \"status\": \"deleted\", - \"file_id\": \"f123\", - \"file_name\": \"entities_batch1.parquet\", - \"message\": \"File deleted successfully. DuckDB will automatically exclude it from queries.\" - } - ``` - - **Example Usage:** - ```bash - curl -X DELETE -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123 - ``` - - **Tips:** - - Delete files before ingestion for best results - - Table statistics update automatically - - No need to refresh DuckDB - exclusion is automatic - - Consider re-uploading corrected version after deletion - - **Note:** - File deletion is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - file_id (str): File ID - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, DeleteFileResponse, ErrorResponse, HTTPValidationError]] - """ + """Delete File from Staging + + Delete a file from S3 storage and database tracking. + + Remove unwanted, duplicate, or incorrect files from staging tables before ingestion. + The file is deleted from both S3 and database tracking, and table statistics + are automatically recalculated. + + **Use Cases:** + - Remove duplicate uploads + - Delete files with incorrect data + - Clean up failed uploads + - Fix data quality issues before ingestion + - Manage storage usage + + **What Happens:** + 1. File deleted from S3 storage + 2. Database tracking record removed + 3. Table statistics recalculated (file count, size, row count) + 4. DuckDB automatically excludes file from future queries + + **Security:** + - Write access required (verified via auth) + - Shared repositories block file deletions + - Full audit trail of deletion operations + - Cannot delete after ingestion to graph + + **Important Notes:** + - Delete files before ingestion for best results + - Table statistics update automatically + - No need to refresh DuckDB - exclusion is automatic + - Consider re-uploading corrected version after deletion + - File deletion is included - no credit consumption + + Args: + graph_id (str): + file_id (str): File ID + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DeleteFileResponse, ErrorResponse, HTTPValidationError]] + """ kwargs = _get_kwargs( graph_id=graph_id, file_id=file_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -356,82 +261,57 @@ async def asyncio( file_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, DeleteFileResponse, ErrorResponse, HTTPValidationError]]: - r""" Delete File from Staging - - Delete a file from S3 storage and database tracking. - - **Purpose:** - Remove unwanted, duplicate, or incorrect files from staging tables before ingestion. - The file is deleted from both S3 and database tracking, and table statistics - are automatically recalculated. - - **Use Cases:** - - Remove duplicate uploads - - Delete files with incorrect data - - Clean up failed uploads - - Fix data quality issues before ingestion - - Manage storage usage - - **What Happens:** - 1. File deleted from S3 storage - 2. Database tracking record removed - 3. Table statistics recalculated (file count, size, row count) - 4. DuckDB automatically excludes file from future queries - - **Security:** - - Write access required (verified via auth) - - Shared repositories block file deletions - - Full audit trail of deletion operations - - Cannot delete after ingestion to graph - - **Example Response:** - ```json - { - \"status\": \"deleted\", - \"file_id\": \"f123\", - \"file_name\": \"entities_batch1.parquet\", - \"message\": \"File deleted successfully. DuckDB will automatically exclude it from queries.\" - } - ``` - - **Example Usage:** - ```bash - curl -X DELETE -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123 - ``` - - **Tips:** - - Delete files before ingestion for best results - - Table statistics update automatically - - No need to refresh DuckDB - exclusion is automatic - - Consider re-uploading corrected version after deletion - - **Note:** - File deletion is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - file_id (str): File ID - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, DeleteFileResponse, ErrorResponse, HTTPValidationError] - """ + """Delete File from Staging + + Delete a file from S3 storage and database tracking. + + Remove unwanted, duplicate, or incorrect files from staging tables before ingestion. + The file is deleted from both S3 and database tracking, and table statistics + are automatically recalculated. + + **Use Cases:** + - Remove duplicate uploads + - Delete files with incorrect data + - Clean up failed uploads + - Fix data quality issues before ingestion + - Manage storage usage + + **What Happens:** + 1. File deleted from S3 storage + 2. Database tracking record removed + 3. Table statistics recalculated (file count, size, row count) + 4. DuckDB automatically excludes file from future queries + + **Security:** + - Write access required (verified via auth) + - Shared repositories block file deletions + - Full audit trail of deletion operations + - Cannot delete after ingestion to graph + + **Important Notes:** + - Delete files before ingestion for best results + - Table statistics update automatically + - No need to refresh DuckDB - exclusion is automatic + - Consider re-uploading corrected version after deletion + - File deletion is included - no credit consumption + + Args: + graph_id (str): + file_id (str): File ID + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DeleteFileResponse, ErrorResponse, HTTPValidationError] + """ return ( await asyncio_detailed( graph_id=graph_id, file_id=file_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/tables/get_file_info.py b/robosystems_client/api/tables/get_file_info.py index 557134f..1601b64 100644 --- a/robosystems_client/api/tables/get_file_info.py +++ b/robosystems_client/api/tables/get_file_info.py @@ -8,38 +8,18 @@ from ...models.error_response import ErrorResponse from ...models.get_file_info_response import GetFileInfoResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, file_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/tables/files/{file_id}", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -92,72 +72,40 @@ def sync_detailed( file_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]]: - r""" Get File Information - - Get detailed information about a specific file. - - **Purpose:** - Retrieve comprehensive metadata for a single file, including upload status, - size, row count, and timestamps. Useful for validating individual files - before ingestion. - - **Use Cases:** - - Validate file upload completion - - Check file metadata before ingestion - - Debug upload issues - - Verify file format and size - - Track file lifecycle - - **Example Response:** - ```json - { - \"file_id\": \"f123\", - \"graph_id\": \"kg123\", - \"table_id\": \"t456\", - \"table_name\": \"Entity\", - \"file_name\": \"entities_batch1.parquet\", - \"file_format\": \"parquet\", - \"size_bytes\": 1048576, - \"row_count\": 5000, - \"upload_status\": \"uploaded\", - \"upload_method\": \"presigned_url\", - \"created_at\": \"2025-10-28T10:00:00Z\", - \"uploaded_at\": \"2025-10-28T10:01:30Z\", - \"s3_key\": \"user-staging/user123/kg123/Entity/entities_batch1.parquet\" - } - ``` - - **Example Usage:** - ```bash - curl -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123 - ``` - - **Note:** - File info retrieval is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - file_id (str): File ID - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]] - """ + """Get File Information + + Get detailed information about a specific file. + + Retrieve comprehensive metadata for a single file, including upload status, + size, row count, and timestamps. Useful for validating individual files + before ingestion. + + **Use Cases:** + - Validate file upload completion + - Check file metadata before ingestion + - Debug upload issues + - Verify file format and size + - Track file lifecycle + + **Note:** + File info retrieval is included - no credit consumption + + Args: + graph_id (str): + file_id (str): File ID + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]] + """ kwargs = _get_kwargs( graph_id=graph_id, file_id=file_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -172,73 +120,41 @@ def sync( file_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]]: - r""" Get File Information - - Get detailed information about a specific file. - - **Purpose:** - Retrieve comprehensive metadata for a single file, including upload status, - size, row count, and timestamps. Useful for validating individual files - before ingestion. - - **Use Cases:** - - Validate file upload completion - - Check file metadata before ingestion - - Debug upload issues - - Verify file format and size - - Track file lifecycle - - **Example Response:** - ```json - { - \"file_id\": \"f123\", - \"graph_id\": \"kg123\", - \"table_id\": \"t456\", - \"table_name\": \"Entity\", - \"file_name\": \"entities_batch1.parquet\", - \"file_format\": \"parquet\", - \"size_bytes\": 1048576, - \"row_count\": 5000, - \"upload_status\": \"uploaded\", - \"upload_method\": \"presigned_url\", - \"created_at\": \"2025-10-28T10:00:00Z\", - \"uploaded_at\": \"2025-10-28T10:01:30Z\", - \"s3_key\": \"user-staging/user123/kg123/Entity/entities_batch1.parquet\" - } - ``` - - **Example Usage:** - ```bash - curl -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123 - ``` - - **Note:** - File info retrieval is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - file_id (str): File ID - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError] - """ + """Get File Information + + Get detailed information about a specific file. + + Retrieve comprehensive metadata for a single file, including upload status, + size, row count, and timestamps. Useful for validating individual files + before ingestion. + + **Use Cases:** + - Validate file upload completion + - Check file metadata before ingestion + - Debug upload issues + - Verify file format and size + - Track file lifecycle + + **Note:** + File info retrieval is included - no credit consumption + + Args: + graph_id (str): + file_id (str): File ID + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError] + """ return sync_detailed( graph_id=graph_id, file_id=file_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -247,72 +163,40 @@ async def asyncio_detailed( file_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]]: - r""" Get File Information - - Get detailed information about a specific file. - - **Purpose:** - Retrieve comprehensive metadata for a single file, including upload status, - size, row count, and timestamps. Useful for validating individual files - before ingestion. - - **Use Cases:** - - Validate file upload completion - - Check file metadata before ingestion - - Debug upload issues - - Verify file format and size - - Track file lifecycle - - **Example Response:** - ```json - { - \"file_id\": \"f123\", - \"graph_id\": \"kg123\", - \"table_id\": \"t456\", - \"table_name\": \"Entity\", - \"file_name\": \"entities_batch1.parquet\", - \"file_format\": \"parquet\", - \"size_bytes\": 1048576, - \"row_count\": 5000, - \"upload_status\": \"uploaded\", - \"upload_method\": \"presigned_url\", - \"created_at\": \"2025-10-28T10:00:00Z\", - \"uploaded_at\": \"2025-10-28T10:01:30Z\", - \"s3_key\": \"user-staging/user123/kg123/Entity/entities_batch1.parquet\" - } - ``` - - **Example Usage:** - ```bash - curl -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123 - ``` - - **Note:** - File info retrieval is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - file_id (str): File ID - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]] - """ + """Get File Information + + Get detailed information about a specific file. + + Retrieve comprehensive metadata for a single file, including upload status, + size, row count, and timestamps. Useful for validating individual files + before ingestion. + + **Use Cases:** + - Validate file upload completion + - Check file metadata before ingestion + - Debug upload issues + - Verify file format and size + - Track file lifecycle + + **Note:** + File info retrieval is included - no credit consumption + + Args: + graph_id (str): + file_id (str): File ID + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]] + """ kwargs = _get_kwargs( graph_id=graph_id, file_id=file_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -325,73 +209,41 @@ async def asyncio( file_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError]]: - r""" Get File Information - - Get detailed information about a specific file. - - **Purpose:** - Retrieve comprehensive metadata for a single file, including upload status, - size, row count, and timestamps. Useful for validating individual files - before ingestion. - - **Use Cases:** - - Validate file upload completion - - Check file metadata before ingestion - - Debug upload issues - - Verify file format and size - - Track file lifecycle - - **Example Response:** - ```json - { - \"file_id\": \"f123\", - \"graph_id\": \"kg123\", - \"table_id\": \"t456\", - \"table_name\": \"Entity\", - \"file_name\": \"entities_batch1.parquet\", - \"file_format\": \"parquet\", - \"size_bytes\": 1048576, - \"row_count\": 5000, - \"upload_status\": \"uploaded\", - \"upload_method\": \"presigned_url\", - \"created_at\": \"2025-10-28T10:00:00Z\", - \"uploaded_at\": \"2025-10-28T10:01:30Z\", - \"s3_key\": \"user-staging/user123/kg123/Entity/entities_batch1.parquet\" - } - ``` - - **Example Usage:** - ```bash - curl -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123 - ``` - - **Note:** - File info retrieval is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - file_id (str): File ID - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError] - """ + """Get File Information + + Get detailed information about a specific file. + + Retrieve comprehensive metadata for a single file, including upload status, + size, row count, and timestamps. Useful for validating individual files + before ingestion. + + **Use Cases:** + - Validate file upload completion + - Check file metadata before ingestion + - Debug upload issues + - Verify file format and size + - Track file lifecycle + + **Note:** + File info retrieval is included - no credit consumption + + Args: + graph_id (str): + file_id (str): File ID + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ErrorResponse, GetFileInfoResponse, HTTPValidationError] + """ return ( await asyncio_detailed( graph_id=graph_id, file_id=file_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/tables/get_upload_url.py b/robosystems_client/api/tables/get_upload_url.py index c778acb..b48ad79 100644 --- a/robosystems_client/api/tables/get_upload_url.py +++ b/robosystems_client/api/tables/get_upload_url.py @@ -9,7 +9,7 @@ from ...models.file_upload_request import FileUploadRequest from ...models.file_upload_response import FileUploadResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( @@ -17,28 +17,12 @@ def _get_kwargs( table_name: str, *, body: FileUploadRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/tables/{table_name}/files", - "params": params, } _kwargs["json"] = body.to_dict() @@ -108,105 +92,60 @@ def sync_detailed( *, client: AuthenticatedClient, body: FileUploadRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]: - r""" Get File Upload URL - - Generate a presigned S3 URL for secure file upload. - - **Purpose:** - Initiate file upload to a staging table by generating a secure, time-limited - presigned S3 URL. Files are uploaded directly to S3, bypassing the API for - optimal performance. - - **Upload Workflow:** - 1. Call this endpoint to get presigned URL - 2. PUT file directly to S3 URL (using curl, axios, etc.) - 3. Call PATCH /tables/files/{file_id} with status='uploaded' - 4. Backend validates file and calculates metrics - 5. File ready for ingestion - - **Supported Formats:** - - Parquet (`application/x-parquet` with `.parquet` extension) - - CSV (`text/csv` with `.csv` extension) - - JSON (`application/json` with `.json` extension) - - **Validation:** - - File extension must match content type - - File name 1-255 characters - - No path traversal characters (.. / \) - - Auto-creates table if it doesn't exist - - **Auto-Table Creation:** - If the table doesn't exist, it's automatically created with: - - Type inferred from name (e.g., \"Transaction\" → relationship) - - Empty schema (populated on ingestion) - - Ready for file uploads - - **Example Response:** - ```json - { - \"upload_url\": \"https://bucket.s3.amazonaws.com/path?X-Amz-Algorithm=...\", - \"expires_in\": 3600, - \"file_id\": \"f123-456-789\", - \"s3_key\": \"user-staging/user123/kg456/Entity/f123.../data.parquet\" - } - ``` - - **Example Usage:** - ```bash - # Step 1: Get upload URL - curl -X POST \"https://api.robosystems.ai/v1/graphs/kg123/tables/Entity/files\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{ - \"file_name\": \"entities.parquet\", - \"content_type\": \"application/x-parquet\" - }' - - # Step 2: Upload file directly to S3 - curl -X PUT \"$UPLOAD_URL\" \ - -H \"Content-Type: application/x-parquet\" \ - --data-binary \"@entities.parquet\" - - # Step 3: Mark as uploaded - curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/$FILE_ID\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{\"status\": \"uploaded\"}' - ``` - - **Tips:** - - Presigned URLs expire (default: 1 hour) - - Use appropriate Content-Type header when uploading to S3 - - File extension must match content type - - Large files benefit from direct S3 upload - - **Note:** - Upload URL generation is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - table_name (str): Table name - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - body (FileUploadRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]] - """ + r"""Get File Upload URL + + Generate a presigned S3 URL for secure file upload. + + Initiates file upload to a staging table by generating a secure, time-limited + presigned S3 URL. Files are uploaded directly to S3, bypassing the API for + optimal performance. + + **Upload Workflow:** + 1. Call this endpoint to get presigned URL + 2. PUT file directly to S3 URL + 3. Call PATCH /tables/files/{file_id} with status='uploaded' + 4. Backend validates file and calculates metrics + 5. File ready for ingestion + + **Supported Formats:** + - Parquet (`application/x-parquet` with `.parquet` extension) + - CSV (`text/csv` with `.csv` extension) + - JSON (`application/json` with `.json` extension) + + **Validation:** + - File extension must match content type + - File name 1-255 characters + - No path traversal characters (.. / \) + - Auto-creates table if it doesn't exist + + **Auto-Table Creation:** + Tables are automatically created on first file upload with type inferred from name + (e.g., \"Transaction\" → relationship) and empty schema populated during ingestion. + + **Important Notes:** + - Presigned URLs expire (default: 1 hour) + - Use appropriate Content-Type header when uploading to S3 + - File extension must match content type + - Upload URL generation is included - no credit consumption + + Args: + graph_id (str): + table_name (str): Table name + body (FileUploadRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]] + """ kwargs = _get_kwargs( graph_id=graph_id, table_name=table_name, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -222,106 +161,61 @@ def sync( *, client: AuthenticatedClient, body: FileUploadRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]: - r""" Get File Upload URL - - Generate a presigned S3 URL for secure file upload. - - **Purpose:** - Initiate file upload to a staging table by generating a secure, time-limited - presigned S3 URL. Files are uploaded directly to S3, bypassing the API for - optimal performance. - - **Upload Workflow:** - 1. Call this endpoint to get presigned URL - 2. PUT file directly to S3 URL (using curl, axios, etc.) - 3. Call PATCH /tables/files/{file_id} with status='uploaded' - 4. Backend validates file and calculates metrics - 5. File ready for ingestion - - **Supported Formats:** - - Parquet (`application/x-parquet` with `.parquet` extension) - - CSV (`text/csv` with `.csv` extension) - - JSON (`application/json` with `.json` extension) - - **Validation:** - - File extension must match content type - - File name 1-255 characters - - No path traversal characters (.. / \) - - Auto-creates table if it doesn't exist - - **Auto-Table Creation:** - If the table doesn't exist, it's automatically created with: - - Type inferred from name (e.g., \"Transaction\" → relationship) - - Empty schema (populated on ingestion) - - Ready for file uploads - - **Example Response:** - ```json - { - \"upload_url\": \"https://bucket.s3.amazonaws.com/path?X-Amz-Algorithm=...\", - \"expires_in\": 3600, - \"file_id\": \"f123-456-789\", - \"s3_key\": \"user-staging/user123/kg456/Entity/f123.../data.parquet\" - } - ``` - - **Example Usage:** - ```bash - # Step 1: Get upload URL - curl -X POST \"https://api.robosystems.ai/v1/graphs/kg123/tables/Entity/files\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{ - \"file_name\": \"entities.parquet\", - \"content_type\": \"application/x-parquet\" - }' - - # Step 2: Upload file directly to S3 - curl -X PUT \"$UPLOAD_URL\" \ - -H \"Content-Type: application/x-parquet\" \ - --data-binary \"@entities.parquet\" - - # Step 3: Mark as uploaded - curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/$FILE_ID\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{\"status\": \"uploaded\"}' - ``` - - **Tips:** - - Presigned URLs expire (default: 1 hour) - - Use appropriate Content-Type header when uploading to S3 - - File extension must match content type - - Large files benefit from direct S3 upload - - **Note:** - Upload URL generation is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - table_name (str): Table name - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - body (FileUploadRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError] - """ + r"""Get File Upload URL + + Generate a presigned S3 URL for secure file upload. + + Initiates file upload to a staging table by generating a secure, time-limited + presigned S3 URL. Files are uploaded directly to S3, bypassing the API for + optimal performance. + + **Upload Workflow:** + 1. Call this endpoint to get presigned URL + 2. PUT file directly to S3 URL + 3. Call PATCH /tables/files/{file_id} with status='uploaded' + 4. Backend validates file and calculates metrics + 5. File ready for ingestion + + **Supported Formats:** + - Parquet (`application/x-parquet` with `.parquet` extension) + - CSV (`text/csv` with `.csv` extension) + - JSON (`application/json` with `.json` extension) + + **Validation:** + - File extension must match content type + - File name 1-255 characters + - No path traversal characters (.. / \) + - Auto-creates table if it doesn't exist + + **Auto-Table Creation:** + Tables are automatically created on first file upload with type inferred from name + (e.g., \"Transaction\" → relationship) and empty schema populated during ingestion. + + **Important Notes:** + - Presigned URLs expire (default: 1 hour) + - Use appropriate Content-Type header when uploading to S3 + - File extension must match content type + - Upload URL generation is included - no credit consumption + + Args: + graph_id (str): + table_name (str): Table name + body (FileUploadRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError] + """ return sync_detailed( graph_id=graph_id, table_name=table_name, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -331,105 +225,60 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: FileUploadRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]: - r""" Get File Upload URL - - Generate a presigned S3 URL for secure file upload. - - **Purpose:** - Initiate file upload to a staging table by generating a secure, time-limited - presigned S3 URL. Files are uploaded directly to S3, bypassing the API for - optimal performance. - - **Upload Workflow:** - 1. Call this endpoint to get presigned URL - 2. PUT file directly to S3 URL (using curl, axios, etc.) - 3. Call PATCH /tables/files/{file_id} with status='uploaded' - 4. Backend validates file and calculates metrics - 5. File ready for ingestion - - **Supported Formats:** - - Parquet (`application/x-parquet` with `.parquet` extension) - - CSV (`text/csv` with `.csv` extension) - - JSON (`application/json` with `.json` extension) - - **Validation:** - - File extension must match content type - - File name 1-255 characters - - No path traversal characters (.. / \) - - Auto-creates table if it doesn't exist - - **Auto-Table Creation:** - If the table doesn't exist, it's automatically created with: - - Type inferred from name (e.g., \"Transaction\" → relationship) - - Empty schema (populated on ingestion) - - Ready for file uploads - - **Example Response:** - ```json - { - \"upload_url\": \"https://bucket.s3.amazonaws.com/path?X-Amz-Algorithm=...\", - \"expires_in\": 3600, - \"file_id\": \"f123-456-789\", - \"s3_key\": \"user-staging/user123/kg456/Entity/f123.../data.parquet\" - } - ``` - - **Example Usage:** - ```bash - # Step 1: Get upload URL - curl -X POST \"https://api.robosystems.ai/v1/graphs/kg123/tables/Entity/files\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{ - \"file_name\": \"entities.parquet\", - \"content_type\": \"application/x-parquet\" - }' - - # Step 2: Upload file directly to S3 - curl -X PUT \"$UPLOAD_URL\" \ - -H \"Content-Type: application/x-parquet\" \ - --data-binary \"@entities.parquet\" - - # Step 3: Mark as uploaded - curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/$FILE_ID\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{\"status\": \"uploaded\"}' - ``` - - **Tips:** - - Presigned URLs expire (default: 1 hour) - - Use appropriate Content-Type header when uploading to S3 - - File extension must match content type - - Large files benefit from direct S3 upload - - **Note:** - Upload URL generation is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - table_name (str): Table name - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - body (FileUploadRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]] - """ + r"""Get File Upload URL + + Generate a presigned S3 URL for secure file upload. + + Initiates file upload to a staging table by generating a secure, time-limited + presigned S3 URL. Files are uploaded directly to S3, bypassing the API for + optimal performance. + + **Upload Workflow:** + 1. Call this endpoint to get presigned URL + 2. PUT file directly to S3 URL + 3. Call PATCH /tables/files/{file_id} with status='uploaded' + 4. Backend validates file and calculates metrics + 5. File ready for ingestion + + **Supported Formats:** + - Parquet (`application/x-parquet` with `.parquet` extension) + - CSV (`text/csv` with `.csv` extension) + - JSON (`application/json` with `.json` extension) + + **Validation:** + - File extension must match content type + - File name 1-255 characters + - No path traversal characters (.. / \) + - Auto-creates table if it doesn't exist + + **Auto-Table Creation:** + Tables are automatically created on first file upload with type inferred from name + (e.g., \"Transaction\" → relationship) and empty schema populated during ingestion. + + **Important Notes:** + - Presigned URLs expire (default: 1 hour) + - Use appropriate Content-Type header when uploading to S3 + - File extension must match content type + - Upload URL generation is included - no credit consumption + + Args: + graph_id (str): + table_name (str): Table name + body (FileUploadRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]] + """ kwargs = _get_kwargs( graph_id=graph_id, table_name=table_name, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -443,98 +292,55 @@ async def asyncio( *, client: AuthenticatedClient, body: FileUploadRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]: - r""" Get File Upload URL - - Generate a presigned S3 URL for secure file upload. - - **Purpose:** - Initiate file upload to a staging table by generating a secure, time-limited - presigned S3 URL. Files are uploaded directly to S3, bypassing the API for - optimal performance. - - **Upload Workflow:** - 1. Call this endpoint to get presigned URL - 2. PUT file directly to S3 URL (using curl, axios, etc.) - 3. Call PATCH /tables/files/{file_id} with status='uploaded' - 4. Backend validates file and calculates metrics - 5. File ready for ingestion - - **Supported Formats:** - - Parquet (`application/x-parquet` with `.parquet` extension) - - CSV (`text/csv` with `.csv` extension) - - JSON (`application/json` with `.json` extension) - - **Validation:** - - File extension must match content type - - File name 1-255 characters - - No path traversal characters (.. / \) - - Auto-creates table if it doesn't exist - - **Auto-Table Creation:** - If the table doesn't exist, it's automatically created with: - - Type inferred from name (e.g., \"Transaction\" → relationship) - - Empty schema (populated on ingestion) - - Ready for file uploads - - **Example Response:** - ```json - { - \"upload_url\": \"https://bucket.s3.amazonaws.com/path?X-Amz-Algorithm=...\", - \"expires_in\": 3600, - \"file_id\": \"f123-456-789\", - \"s3_key\": \"user-staging/user123/kg456/Entity/f123.../data.parquet\" - } - ``` - - **Example Usage:** - ```bash - # Step 1: Get upload URL - curl -X POST \"https://api.robosystems.ai/v1/graphs/kg123/tables/Entity/files\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{ - \"file_name\": \"entities.parquet\", - \"content_type\": \"application/x-parquet\" - }' - - # Step 2: Upload file directly to S3 - curl -X PUT \"$UPLOAD_URL\" \ - -H \"Content-Type: application/x-parquet\" \ - --data-binary \"@entities.parquet\" - - # Step 3: Mark as uploaded - curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/$FILE_ID\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{\"status\": \"uploaded\"}' - ``` - - **Tips:** - - Presigned URLs expire (default: 1 hour) - - Use appropriate Content-Type header when uploading to S3 - - File extension must match content type - - Large files benefit from direct S3 upload - - **Note:** - Upload URL generation is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - table_name (str): Table name - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - body (FileUploadRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError] - """ + r"""Get File Upload URL + + Generate a presigned S3 URL for secure file upload. + + Initiates file upload to a staging table by generating a secure, time-limited + presigned S3 URL. Files are uploaded directly to S3, bypassing the API for + optimal performance. + + **Upload Workflow:** + 1. Call this endpoint to get presigned URL + 2. PUT file directly to S3 URL + 3. Call PATCH /tables/files/{file_id} with status='uploaded' + 4. Backend validates file and calculates metrics + 5. File ready for ingestion + + **Supported Formats:** + - Parquet (`application/x-parquet` with `.parquet` extension) + - CSV (`text/csv` with `.csv` extension) + - JSON (`application/json` with `.json` extension) + + **Validation:** + - File extension must match content type + - File name 1-255 characters + - No path traversal characters (.. / \) + - Auto-creates table if it doesn't exist + + **Auto-Table Creation:** + Tables are automatically created on first file upload with type inferred from name + (e.g., \"Transaction\" → relationship) and empty schema populated during ingestion. + + **Important Notes:** + - Presigned URLs expire (default: 1 hour) + - Use appropriate Content-Type header when uploading to S3 + - File extension must match content type + - Upload URL generation is included - no credit consumption + + Args: + graph_id (str): + table_name (str): Table name + body (FileUploadRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError] + """ return ( await asyncio_detailed( @@ -542,7 +348,5 @@ async def asyncio( table_name=table_name, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/tables/ingest_tables.py b/robosystems_client/api/tables/ingest_tables.py index 4cd04ed..7191471 100644 --- a/robosystems_client/api/tables/ingest_tables.py +++ b/robosystems_client/api/tables/ingest_tables.py @@ -9,35 +9,19 @@ from ...models.bulk_ingest_response import BulkIngestResponse from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, *, body: BulkIngestRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/tables/ingest", - "params": params, } _kwargs["json"] = body.to_dict() @@ -107,123 +91,80 @@ def sync_detailed( *, client: AuthenticatedClient, body: BulkIngestRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]: - r""" Ingest Tables to Graph - - Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database. - - **Purpose:** - Orchestrates the complete data pipeline from S3 staging files into the Kuzu graph database. - Processes all tables in a single bulk operation with comprehensive error handling and metrics. - - **Use Cases:** - - Initial graph population from uploaded data - - Incremental data updates with new files - - Complete database rebuild from source files - - Recovery from failed ingestion attempts - - **Workflow:** - 1. Upload data files via `POST /tables/{table_name}/files` - 2. Files are validated and marked as 'uploaded' - 3. Trigger ingestion: `POST /tables/ingest` - 4. DuckDB staging tables created from S3 patterns - 5. Data copied row-by-row from DuckDB to Kuzu - 6. Per-table results and metrics returned - - **Rebuild Feature:** - Setting `rebuild=true` regenerates the entire graph database from scratch: - - Deletes existing Kuzu database - - Recreates with fresh schema from active GraphSchema - - Ingests all data files - - Safe operation - S3 is source of truth - - Useful for schema changes or data corrections - - Graph marked as 'rebuilding' during process - - **Error Handling:** - - Per-table error isolation with `ignore_errors` flag - - Partial success support (some tables succeed, some fail) - - Detailed error reporting per table - - Graph status tracking throughout process - - Automatic failure recovery and cleanup - - **Performance:** - - Processes all tables in sequence - - Each table timed independently - - Total execution metrics provided - - Scales to thousands of files - - Optimized for large datasets - - **Example Request:** - ```bash - curl -X POST \"https://api.robosystems.ai/v1/graphs/kg123/tables/ingest\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{ - \"ignore_errors\": true, - \"rebuild\": false - }' - ``` - - **Example Response:** - ```json - { - \"status\": \"success\", - \"graph_id\": \"kg123\", - \"total_tables\": 5, - \"successful_tables\": 5, - \"failed_tables\": 0, - \"skipped_tables\": 0, - \"total_rows_ingested\": 25000, - \"total_execution_time_ms\": 15420.5, - \"results\": [ - { - \"table_name\": \"Entity\", - \"status\": \"success\", - \"rows_ingested\": 5000, - \"execution_time_ms\": 3200.1, - \"error\": null - } - ] - } - ``` - - **Concurrency Control:** - Only one ingestion can run per graph at a time. If another ingestion is in progress, - you'll receive a 409 Conflict error. The distributed lock automatically expires after - the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions. - - **Tips:** - - Only files with 'uploaded' status are processed - - Tables with no uploaded files are skipped - - Use `ignore_errors=false` for strict validation - - Monitor progress via per-table results - - Check graph metadata for rebuild status - - Wait for current ingestion to complete before starting another - - **Note:** - Table ingestion is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - body (BulkIngestRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]] - """ + """Ingest Tables to Graph + + Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database. + + Orchestrates the complete data pipeline from S3 staging files into the Kuzu graph database. + Processes all tables in a single bulk operation with comprehensive error handling and metrics. + + **Use Cases:** + - Initial graph population from uploaded data + - Incremental data updates with new files + - Complete database rebuild from source files + - Recovery from failed ingestion attempts + + **Workflow:** + 1. Upload data files via `POST /tables/{table_name}/files` + 2. Files are validated and marked as 'uploaded' + 3. Trigger ingestion: `POST /tables/ingest` + 4. DuckDB staging tables created from S3 patterns + 5. Data copied row-by-row from DuckDB to Kuzu + 6. Per-table results and metrics returned + + **Rebuild Feature:** + Setting `rebuild=true` regenerates the entire graph database from scratch: + - Deletes existing Kuzu database + - Recreates with fresh schema from active GraphSchema + - Ingests all data files + - Safe operation - S3 is source of truth + - Useful for schema changes or data corrections + - Graph marked as 'rebuilding' during process + + **Error Handling:** + - Per-table error isolation with `ignore_errors` flag + - Partial success support (some tables succeed, some fail) + - Detailed error reporting per table + - Graph status tracking throughout process + - Automatic failure recovery and cleanup + + **Performance:** + - Processes all tables in sequence + - Each table timed independently + - Total execution metrics provided + - Scales to thousands of files + - Optimized for large datasets + + **Concurrency Control:** + Only one ingestion can run per graph at a time. If another ingestion is in progress, + you'll receive a 409 Conflict error. The distributed lock automatically expires after + the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions. + + **Important Notes:** + - Only files with 'uploaded' status are processed + - Tables with no uploaded files are skipped + - Use `ignore_errors=false` for strict validation + - Monitor progress via per-table results + - Check graph metadata for rebuild status + - Wait for current ingestion to complete before starting another + - Table ingestion is included - no credit consumption + + Args: + graph_id (str): + body (BulkIngestRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]] + """ kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -238,124 +179,81 @@ def sync( *, client: AuthenticatedClient, body: BulkIngestRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]: - r""" Ingest Tables to Graph - - Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database. - - **Purpose:** - Orchestrates the complete data pipeline from S3 staging files into the Kuzu graph database. - Processes all tables in a single bulk operation with comprehensive error handling and metrics. - - **Use Cases:** - - Initial graph population from uploaded data - - Incremental data updates with new files - - Complete database rebuild from source files - - Recovery from failed ingestion attempts - - **Workflow:** - 1. Upload data files via `POST /tables/{table_name}/files` - 2. Files are validated and marked as 'uploaded' - 3. Trigger ingestion: `POST /tables/ingest` - 4. DuckDB staging tables created from S3 patterns - 5. Data copied row-by-row from DuckDB to Kuzu - 6. Per-table results and metrics returned - - **Rebuild Feature:** - Setting `rebuild=true` regenerates the entire graph database from scratch: - - Deletes existing Kuzu database - - Recreates with fresh schema from active GraphSchema - - Ingests all data files - - Safe operation - S3 is source of truth - - Useful for schema changes or data corrections - - Graph marked as 'rebuilding' during process - - **Error Handling:** - - Per-table error isolation with `ignore_errors` flag - - Partial success support (some tables succeed, some fail) - - Detailed error reporting per table - - Graph status tracking throughout process - - Automatic failure recovery and cleanup - - **Performance:** - - Processes all tables in sequence - - Each table timed independently - - Total execution metrics provided - - Scales to thousands of files - - Optimized for large datasets - - **Example Request:** - ```bash - curl -X POST \"https://api.robosystems.ai/v1/graphs/kg123/tables/ingest\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{ - \"ignore_errors\": true, - \"rebuild\": false - }' - ``` - - **Example Response:** - ```json - { - \"status\": \"success\", - \"graph_id\": \"kg123\", - \"total_tables\": 5, - \"successful_tables\": 5, - \"failed_tables\": 0, - \"skipped_tables\": 0, - \"total_rows_ingested\": 25000, - \"total_execution_time_ms\": 15420.5, - \"results\": [ - { - \"table_name\": \"Entity\", - \"status\": \"success\", - \"rows_ingested\": 5000, - \"execution_time_ms\": 3200.1, - \"error\": null - } - ] - } - ``` - - **Concurrency Control:** - Only one ingestion can run per graph at a time. If another ingestion is in progress, - you'll receive a 409 Conflict error. The distributed lock automatically expires after - the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions. - - **Tips:** - - Only files with 'uploaded' status are processed - - Tables with no uploaded files are skipped - - Use `ignore_errors=false` for strict validation - - Monitor progress via per-table results - - Check graph metadata for rebuild status - - Wait for current ingestion to complete before starting another - - **Note:** - Table ingestion is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - body (BulkIngestRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError] - """ + """Ingest Tables to Graph + + Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database. + + Orchestrates the complete data pipeline from S3 staging files into the Kuzu graph database. + Processes all tables in a single bulk operation with comprehensive error handling and metrics. + + **Use Cases:** + - Initial graph population from uploaded data + - Incremental data updates with new files + - Complete database rebuild from source files + - Recovery from failed ingestion attempts + + **Workflow:** + 1. Upload data files via `POST /tables/{table_name}/files` + 2. Files are validated and marked as 'uploaded' + 3. Trigger ingestion: `POST /tables/ingest` + 4. DuckDB staging tables created from S3 patterns + 5. Data copied row-by-row from DuckDB to Kuzu + 6. Per-table results and metrics returned + + **Rebuild Feature:** + Setting `rebuild=true` regenerates the entire graph database from scratch: + - Deletes existing Kuzu database + - Recreates with fresh schema from active GraphSchema + - Ingests all data files + - Safe operation - S3 is source of truth + - Useful for schema changes or data corrections + - Graph marked as 'rebuilding' during process + + **Error Handling:** + - Per-table error isolation with `ignore_errors` flag + - Partial success support (some tables succeed, some fail) + - Detailed error reporting per table + - Graph status tracking throughout process + - Automatic failure recovery and cleanup + + **Performance:** + - Processes all tables in sequence + - Each table timed independently + - Total execution metrics provided + - Scales to thousands of files + - Optimized for large datasets + + **Concurrency Control:** + Only one ingestion can run per graph at a time. If another ingestion is in progress, + you'll receive a 409 Conflict error. The distributed lock automatically expires after + the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions. + + **Important Notes:** + - Only files with 'uploaded' status are processed + - Tables with no uploaded files are skipped + - Use `ignore_errors=false` for strict validation + - Monitor progress via per-table results + - Check graph metadata for rebuild status + - Wait for current ingestion to complete before starting another + - Table ingestion is included - no credit consumption + + Args: + graph_id (str): + body (BulkIngestRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError] + """ return sync_detailed( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -364,123 +262,80 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: BulkIngestRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]: - r""" Ingest Tables to Graph - - Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database. - - **Purpose:** - Orchestrates the complete data pipeline from S3 staging files into the Kuzu graph database. - Processes all tables in a single bulk operation with comprehensive error handling and metrics. - - **Use Cases:** - - Initial graph population from uploaded data - - Incremental data updates with new files - - Complete database rebuild from source files - - Recovery from failed ingestion attempts - - **Workflow:** - 1. Upload data files via `POST /tables/{table_name}/files` - 2. Files are validated and marked as 'uploaded' - 3. Trigger ingestion: `POST /tables/ingest` - 4. DuckDB staging tables created from S3 patterns - 5. Data copied row-by-row from DuckDB to Kuzu - 6. Per-table results and metrics returned - - **Rebuild Feature:** - Setting `rebuild=true` regenerates the entire graph database from scratch: - - Deletes existing Kuzu database - - Recreates with fresh schema from active GraphSchema - - Ingests all data files - - Safe operation - S3 is source of truth - - Useful for schema changes or data corrections - - Graph marked as 'rebuilding' during process - - **Error Handling:** - - Per-table error isolation with `ignore_errors` flag - - Partial success support (some tables succeed, some fail) - - Detailed error reporting per table - - Graph status tracking throughout process - - Automatic failure recovery and cleanup - - **Performance:** - - Processes all tables in sequence - - Each table timed independently - - Total execution metrics provided - - Scales to thousands of files - - Optimized for large datasets - - **Example Request:** - ```bash - curl -X POST \"https://api.robosystems.ai/v1/graphs/kg123/tables/ingest\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{ - \"ignore_errors\": true, - \"rebuild\": false - }' - ``` - - **Example Response:** - ```json - { - \"status\": \"success\", - \"graph_id\": \"kg123\", - \"total_tables\": 5, - \"successful_tables\": 5, - \"failed_tables\": 0, - \"skipped_tables\": 0, - \"total_rows_ingested\": 25000, - \"total_execution_time_ms\": 15420.5, - \"results\": [ - { - \"table_name\": \"Entity\", - \"status\": \"success\", - \"rows_ingested\": 5000, - \"execution_time_ms\": 3200.1, - \"error\": null - } - ] - } - ``` - - **Concurrency Control:** - Only one ingestion can run per graph at a time. If another ingestion is in progress, - you'll receive a 409 Conflict error. The distributed lock automatically expires after - the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions. - - **Tips:** - - Only files with 'uploaded' status are processed - - Tables with no uploaded files are skipped - - Use `ignore_errors=false` for strict validation - - Monitor progress via per-table results - - Check graph metadata for rebuild status - - Wait for current ingestion to complete before starting another - - **Note:** - Table ingestion is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - body (BulkIngestRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]] - """ + """Ingest Tables to Graph + + Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database. + + Orchestrates the complete data pipeline from S3 staging files into the Kuzu graph database. + Processes all tables in a single bulk operation with comprehensive error handling and metrics. + + **Use Cases:** + - Initial graph population from uploaded data + - Incremental data updates with new files + - Complete database rebuild from source files + - Recovery from failed ingestion attempts + + **Workflow:** + 1. Upload data files via `POST /tables/{table_name}/files` + 2. Files are validated and marked as 'uploaded' + 3. Trigger ingestion: `POST /tables/ingest` + 4. DuckDB staging tables created from S3 patterns + 5. Data copied row-by-row from DuckDB to Kuzu + 6. Per-table results and metrics returned + + **Rebuild Feature:** + Setting `rebuild=true` regenerates the entire graph database from scratch: + - Deletes existing Kuzu database + - Recreates with fresh schema from active GraphSchema + - Ingests all data files + - Safe operation - S3 is source of truth + - Useful for schema changes or data corrections + - Graph marked as 'rebuilding' during process + + **Error Handling:** + - Per-table error isolation with `ignore_errors` flag + - Partial success support (some tables succeed, some fail) + - Detailed error reporting per table + - Graph status tracking throughout process + - Automatic failure recovery and cleanup + + **Performance:** + - Processes all tables in sequence + - Each table timed independently + - Total execution metrics provided + - Scales to thousands of files + - Optimized for large datasets + + **Concurrency Control:** + Only one ingestion can run per graph at a time. If another ingestion is in progress, + you'll receive a 409 Conflict error. The distributed lock automatically expires after + the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions. + + **Important Notes:** + - Only files with 'uploaded' status are processed + - Tables with no uploaded files are skipped + - Use `ignore_errors=false` for strict validation + - Monitor progress via per-table results + - Check graph metadata for rebuild status + - Wait for current ingestion to complete before starting another + - Table ingestion is included - no credit consumption + + Args: + graph_id (str): + body (BulkIngestRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]] + """ kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -493,124 +348,81 @@ async def asyncio( *, client: AuthenticatedClient, body: BulkIngestRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]: - r""" Ingest Tables to Graph - - Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database. - - **Purpose:** - Orchestrates the complete data pipeline from S3 staging files into the Kuzu graph database. - Processes all tables in a single bulk operation with comprehensive error handling and metrics. - - **Use Cases:** - - Initial graph population from uploaded data - - Incremental data updates with new files - - Complete database rebuild from source files - - Recovery from failed ingestion attempts - - **Workflow:** - 1. Upload data files via `POST /tables/{table_name}/files` - 2. Files are validated and marked as 'uploaded' - 3. Trigger ingestion: `POST /tables/ingest` - 4. DuckDB staging tables created from S3 patterns - 5. Data copied row-by-row from DuckDB to Kuzu - 6. Per-table results and metrics returned - - **Rebuild Feature:** - Setting `rebuild=true` regenerates the entire graph database from scratch: - - Deletes existing Kuzu database - - Recreates with fresh schema from active GraphSchema - - Ingests all data files - - Safe operation - S3 is source of truth - - Useful for schema changes or data corrections - - Graph marked as 'rebuilding' during process - - **Error Handling:** - - Per-table error isolation with `ignore_errors` flag - - Partial success support (some tables succeed, some fail) - - Detailed error reporting per table - - Graph status tracking throughout process - - Automatic failure recovery and cleanup - - **Performance:** - - Processes all tables in sequence - - Each table timed independently - - Total execution metrics provided - - Scales to thousands of files - - Optimized for large datasets - - **Example Request:** - ```bash - curl -X POST \"https://api.robosystems.ai/v1/graphs/kg123/tables/ingest\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{ - \"ignore_errors\": true, - \"rebuild\": false - }' - ``` - - **Example Response:** - ```json - { - \"status\": \"success\", - \"graph_id\": \"kg123\", - \"total_tables\": 5, - \"successful_tables\": 5, - \"failed_tables\": 0, - \"skipped_tables\": 0, - \"total_rows_ingested\": 25000, - \"total_execution_time_ms\": 15420.5, - \"results\": [ - { - \"table_name\": \"Entity\", - \"status\": \"success\", - \"rows_ingested\": 5000, - \"execution_time_ms\": 3200.1, - \"error\": null - } - ] - } - ``` - - **Concurrency Control:** - Only one ingestion can run per graph at a time. If another ingestion is in progress, - you'll receive a 409 Conflict error. The distributed lock automatically expires after - the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions. - - **Tips:** - - Only files with 'uploaded' status are processed - - Tables with no uploaded files are skipped - - Use `ignore_errors=false` for strict validation - - Monitor progress via per-table results - - Check graph metadata for rebuild status - - Wait for current ingestion to complete before starting another - - **Note:** - Table ingestion is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - body (BulkIngestRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError] - """ + """Ingest Tables to Graph + + Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database. + + Orchestrates the complete data pipeline from S3 staging files into the Kuzu graph database. + Processes all tables in a single bulk operation with comprehensive error handling and metrics. + + **Use Cases:** + - Initial graph population from uploaded data + - Incremental data updates with new files + - Complete database rebuild from source files + - Recovery from failed ingestion attempts + + **Workflow:** + 1. Upload data files via `POST /tables/{table_name}/files` + 2. Files are validated and marked as 'uploaded' + 3. Trigger ingestion: `POST /tables/ingest` + 4. DuckDB staging tables created from S3 patterns + 5. Data copied row-by-row from DuckDB to Kuzu + 6. Per-table results and metrics returned + + **Rebuild Feature:** + Setting `rebuild=true` regenerates the entire graph database from scratch: + - Deletes existing Kuzu database + - Recreates with fresh schema from active GraphSchema + - Ingests all data files + - Safe operation - S3 is source of truth + - Useful for schema changes or data corrections + - Graph marked as 'rebuilding' during process + + **Error Handling:** + - Per-table error isolation with `ignore_errors` flag + - Partial success support (some tables succeed, some fail) + - Detailed error reporting per table + - Graph status tracking throughout process + - Automatic failure recovery and cleanup + + **Performance:** + - Processes all tables in sequence + - Each table timed independently + - Total execution metrics provided + - Scales to thousands of files + - Optimized for large datasets + + **Concurrency Control:** + Only one ingestion can run per graph at a time. If another ingestion is in progress, + you'll receive a 409 Conflict error. The distributed lock automatically expires after + the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions. + + **Important Notes:** + - Only files with 'uploaded' status are processed + - Tables with no uploaded files are skipped + - Use `ignore_errors=false` for strict validation + - Monitor progress via per-table results + - Check graph metadata for rebuild status + - Wait for current ingestion to complete before starting another + - Table ingestion is included - no credit consumption + + Args: + graph_id (str): + body (BulkIngestRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError] + """ return ( await asyncio_detailed( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/tables/list_table_files.py b/robosystems_client/api/tables/list_table_files.py index f969357..95a95cb 100644 --- a/robosystems_client/api/tables/list_table_files.py +++ b/robosystems_client/api/tables/list_table_files.py @@ -8,38 +8,18 @@ from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError from ...models.list_table_files_response import ListTableFilesResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, table_name: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/tables/{table_name}/files", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -96,99 +76,59 @@ def sync_detailed( table_name: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesResponse]]: - r""" List Files in Staging Table - - List all files uploaded to a staging table with comprehensive metadata. - - **Purpose:** - Get a complete inventory of all files in a staging table, including upload status, - file sizes, row counts, and S3 locations. Essential for monitoring upload progress - and validating data before ingestion. - - **Use Cases:** - - Monitor file upload progress - - Verify files are ready for ingestion - - Check file formats and sizes - - Track storage usage per table - - Identify failed or incomplete uploads - - Pre-ingestion validation - - **What You Get:** - - File ID and name - - File format (parquet, csv, etc.) - - Size in bytes - - Row count (if available) - - Upload status and method - - Creation and upload timestamps - - S3 key for reference - - **Upload Status Values:** - - `created`: File record created, not yet uploaded - - `uploading`: Upload in progress - - `uploaded`: Successfully uploaded, ready for ingestion - - `failed`: Upload failed - - **Example Response:** - ```json - { - \"graph_id\": \"kg123\", - \"table_name\": \"Entity\", - \"files\": [ - { - \"file_id\": \"f123\", - \"file_name\": \"entities_batch1.parquet\", - \"file_format\": \"parquet\", - \"size_bytes\": 1048576, - \"row_count\": 5000, - \"upload_status\": \"uploaded\", - \"upload_method\": \"presigned_url\", - \"created_at\": \"2025-10-28T10:00:00Z\", - \"uploaded_at\": \"2025-10-28T10:01:30Z\", - \"s3_key\": \"user-staging/user123/kg123/Entity/entities_batch1.parquet\" - } - ], - \"total_files\": 1, - \"total_size_bytes\": 1048576 - } - ``` - - **Example Usage:** - ```bash - curl -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables/Entity/files - ``` - - **Tips:** - - Only `uploaded` files are ingested - - Check `row_count` to estimate data volume - - Use `total_size_bytes` for storage monitoring - - Files with `failed` status should be deleted and re-uploaded - - **Note:** - File listing is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - table_name (str): Table name - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesResponse]] - """ + """List Files in Staging Table + + List all files uploaded to a staging table with comprehensive metadata. + + Get a complete inventory of all files in a staging table, including upload status, + file sizes, row counts, and S3 locations. Essential for monitoring upload progress + and validating data before ingestion. + + **Use Cases:** + - Monitor file upload progress + - Verify files are ready for ingestion + - Check file formats and sizes + - Track storage usage per table + - Identify failed or incomplete uploads + - Pre-ingestion validation + + **Returned Metadata:** + - File ID, name, and format (parquet, csv, json) + - Size in bytes and row count (if available) + - Upload status and method + - Creation and upload timestamps + - S3 key for reference + + **Upload Status Values:** + - `pending`: Upload URL generated, awaiting upload + - `uploaded`: Successfully uploaded, ready for ingestion + - `disabled`: Excluded from ingestion + - `archived`: Soft deleted + - `failed`: Upload failed + + **Important Notes:** + - Only `uploaded` files are ingested + - Check `row_count` to estimate data volume + - Use `total_size_bytes` for storage monitoring + - Files with `failed` status should be deleted and re-uploaded + - File listing is included - no credit consumption + + Args: + graph_id (str): + table_name (str): Table name + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesResponse]] + """ kwargs = _get_kwargs( graph_id=graph_id, table_name=table_name, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -203,100 +143,60 @@ def sync( table_name: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesResponse]]: - r""" List Files in Staging Table - - List all files uploaded to a staging table with comprehensive metadata. - - **Purpose:** - Get a complete inventory of all files in a staging table, including upload status, - file sizes, row counts, and S3 locations. Essential for monitoring upload progress - and validating data before ingestion. - - **Use Cases:** - - Monitor file upload progress - - Verify files are ready for ingestion - - Check file formats and sizes - - Track storage usage per table - - Identify failed or incomplete uploads - - Pre-ingestion validation - - **What You Get:** - - File ID and name - - File format (parquet, csv, etc.) - - Size in bytes - - Row count (if available) - - Upload status and method - - Creation and upload timestamps - - S3 key for reference - - **Upload Status Values:** - - `created`: File record created, not yet uploaded - - `uploading`: Upload in progress - - `uploaded`: Successfully uploaded, ready for ingestion - - `failed`: Upload failed - - **Example Response:** - ```json - { - \"graph_id\": \"kg123\", - \"table_name\": \"Entity\", - \"files\": [ - { - \"file_id\": \"f123\", - \"file_name\": \"entities_batch1.parquet\", - \"file_format\": \"parquet\", - \"size_bytes\": 1048576, - \"row_count\": 5000, - \"upload_status\": \"uploaded\", - \"upload_method\": \"presigned_url\", - \"created_at\": \"2025-10-28T10:00:00Z\", - \"uploaded_at\": \"2025-10-28T10:01:30Z\", - \"s3_key\": \"user-staging/user123/kg123/Entity/entities_batch1.parquet\" - } - ], - \"total_files\": 1, - \"total_size_bytes\": 1048576 - } - ``` - - **Example Usage:** - ```bash - curl -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables/Entity/files - ``` - - **Tips:** - - Only `uploaded` files are ingested - - Check `row_count` to estimate data volume - - Use `total_size_bytes` for storage monitoring - - Files with `failed` status should be deleted and re-uploaded - - **Note:** - File listing is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - table_name (str): Table name - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesResponse] - """ + """List Files in Staging Table + + List all files uploaded to a staging table with comprehensive metadata. + + Get a complete inventory of all files in a staging table, including upload status, + file sizes, row counts, and S3 locations. Essential for monitoring upload progress + and validating data before ingestion. + + **Use Cases:** + - Monitor file upload progress + - Verify files are ready for ingestion + - Check file formats and sizes + - Track storage usage per table + - Identify failed or incomplete uploads + - Pre-ingestion validation + + **Returned Metadata:** + - File ID, name, and format (parquet, csv, json) + - Size in bytes and row count (if available) + - Upload status and method + - Creation and upload timestamps + - S3 key for reference + + **Upload Status Values:** + - `pending`: Upload URL generated, awaiting upload + - `uploaded`: Successfully uploaded, ready for ingestion + - `disabled`: Excluded from ingestion + - `archived`: Soft deleted + - `failed`: Upload failed + + **Important Notes:** + - Only `uploaded` files are ingested + - Check `row_count` to estimate data volume + - Use `total_size_bytes` for storage monitoring + - Files with `failed` status should be deleted and re-uploaded + - File listing is included - no credit consumption + + Args: + graph_id (str): + table_name (str): Table name + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesResponse] + """ return sync_detailed( graph_id=graph_id, table_name=table_name, client=client, - token=token, - authorization=authorization, ).parsed @@ -305,99 +205,59 @@ async def asyncio_detailed( table_name: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesResponse]]: - r""" List Files in Staging Table - - List all files uploaded to a staging table with comprehensive metadata. - - **Purpose:** - Get a complete inventory of all files in a staging table, including upload status, - file sizes, row counts, and S3 locations. Essential for monitoring upload progress - and validating data before ingestion. - - **Use Cases:** - - Monitor file upload progress - - Verify files are ready for ingestion - - Check file formats and sizes - - Track storage usage per table - - Identify failed or incomplete uploads - - Pre-ingestion validation - - **What You Get:** - - File ID and name - - File format (parquet, csv, etc.) - - Size in bytes - - Row count (if available) - - Upload status and method - - Creation and upload timestamps - - S3 key for reference - - **Upload Status Values:** - - `created`: File record created, not yet uploaded - - `uploading`: Upload in progress - - `uploaded`: Successfully uploaded, ready for ingestion - - `failed`: Upload failed - - **Example Response:** - ```json - { - \"graph_id\": \"kg123\", - \"table_name\": \"Entity\", - \"files\": [ - { - \"file_id\": \"f123\", - \"file_name\": \"entities_batch1.parquet\", - \"file_format\": \"parquet\", - \"size_bytes\": 1048576, - \"row_count\": 5000, - \"upload_status\": \"uploaded\", - \"upload_method\": \"presigned_url\", - \"created_at\": \"2025-10-28T10:00:00Z\", - \"uploaded_at\": \"2025-10-28T10:01:30Z\", - \"s3_key\": \"user-staging/user123/kg123/Entity/entities_batch1.parquet\" - } - ], - \"total_files\": 1, - \"total_size_bytes\": 1048576 - } - ``` - - **Example Usage:** - ```bash - curl -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables/Entity/files - ``` - - **Tips:** - - Only `uploaded` files are ingested - - Check `row_count` to estimate data volume - - Use `total_size_bytes` for storage monitoring - - Files with `failed` status should be deleted and re-uploaded - - **Note:** - File listing is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - table_name (str): Table name - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesResponse]] - """ + """List Files in Staging Table + + List all files uploaded to a staging table with comprehensive metadata. + + Get a complete inventory of all files in a staging table, including upload status, + file sizes, row counts, and S3 locations. Essential for monitoring upload progress + and validating data before ingestion. + + **Use Cases:** + - Monitor file upload progress + - Verify files are ready for ingestion + - Check file formats and sizes + - Track storage usage per table + - Identify failed or incomplete uploads + - Pre-ingestion validation + + **Returned Metadata:** + - File ID, name, and format (parquet, csv, json) + - Size in bytes and row count (if available) + - Upload status and method + - Creation and upload timestamps + - S3 key for reference + + **Upload Status Values:** + - `pending`: Upload URL generated, awaiting upload + - `uploaded`: Successfully uploaded, ready for ingestion + - `disabled`: Excluded from ingestion + - `archived`: Soft deleted + - `failed`: Upload failed + + **Important Notes:** + - Only `uploaded` files are ingested + - Check `row_count` to estimate data volume + - Use `total_size_bytes` for storage monitoring + - Files with `failed` status should be deleted and re-uploaded + - File listing is included - no credit consumption + + Args: + graph_id (str): + table_name (str): Table name + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesResponse]] + """ kwargs = _get_kwargs( graph_id=graph_id, table_name=table_name, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -410,100 +270,60 @@ async def asyncio( table_name: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesResponse]]: - r""" List Files in Staging Table - - List all files uploaded to a staging table with comprehensive metadata. - - **Purpose:** - Get a complete inventory of all files in a staging table, including upload status, - file sizes, row counts, and S3 locations. Essential for monitoring upload progress - and validating data before ingestion. - - **Use Cases:** - - Monitor file upload progress - - Verify files are ready for ingestion - - Check file formats and sizes - - Track storage usage per table - - Identify failed or incomplete uploads - - Pre-ingestion validation - - **What You Get:** - - File ID and name - - File format (parquet, csv, etc.) - - Size in bytes - - Row count (if available) - - Upload status and method - - Creation and upload timestamps - - S3 key for reference - - **Upload Status Values:** - - `created`: File record created, not yet uploaded - - `uploading`: Upload in progress - - `uploaded`: Successfully uploaded, ready for ingestion - - `failed`: Upload failed - - **Example Response:** - ```json - { - \"graph_id\": \"kg123\", - \"table_name\": \"Entity\", - \"files\": [ - { - \"file_id\": \"f123\", - \"file_name\": \"entities_batch1.parquet\", - \"file_format\": \"parquet\", - \"size_bytes\": 1048576, - \"row_count\": 5000, - \"upload_status\": \"uploaded\", - \"upload_method\": \"presigned_url\", - \"created_at\": \"2025-10-28T10:00:00Z\", - \"uploaded_at\": \"2025-10-28T10:01:30Z\", - \"s3_key\": \"user-staging/user123/kg123/Entity/entities_batch1.parquet\" - } - ], - \"total_files\": 1, - \"total_size_bytes\": 1048576 - } - ``` - - **Example Usage:** - ```bash - curl -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables/Entity/files - ``` - - **Tips:** - - Only `uploaded` files are ingested - - Check `row_count` to estimate data volume - - Use `total_size_bytes` for storage monitoring - - Files with `failed` status should be deleted and re-uploaded - - **Note:** - File listing is included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - table_name (str): Table name - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesResponse] - """ + """List Files in Staging Table + + List all files uploaded to a staging table with comprehensive metadata. + + Get a complete inventory of all files in a staging table, including upload status, + file sizes, row counts, and S3 locations. Essential for monitoring upload progress + and validating data before ingestion. + + **Use Cases:** + - Monitor file upload progress + - Verify files are ready for ingestion + - Check file formats and sizes + - Track storage usage per table + - Identify failed or incomplete uploads + - Pre-ingestion validation + + **Returned Metadata:** + - File ID, name, and format (parquet, csv, json) + - Size in bytes and row count (if available) + - Upload status and method + - Creation and upload timestamps + - S3 key for reference + + **Upload Status Values:** + - `pending`: Upload URL generated, awaiting upload + - `uploaded`: Successfully uploaded, ready for ingestion + - `disabled`: Excluded from ingestion + - `archived`: Soft deleted + - `failed`: Upload failed + + **Important Notes:** + - Only `uploaded` files are ingested + - Check `row_count` to estimate data volume + - Use `total_size_bytes` for storage monitoring + - Files with `failed` status should be deleted and re-uploaded + - File listing is included - no credit consumption + + Args: + graph_id (str): + table_name (str): Table name + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ErrorResponse, HTTPValidationError, ListTableFilesResponse] + """ return ( await asyncio_detailed( graph_id=graph_id, table_name=table_name, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/tables/list_tables.py b/robosystems_client/api/tables/list_tables.py index 64255ee..0aeb634 100644 --- a/robosystems_client/api/tables/list_tables.py +++ b/robosystems_client/api/tables/list_tables.py @@ -8,37 +8,17 @@ from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError from ...models.table_list_response import TableListResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/graphs/{graph_id}/tables", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -94,95 +74,57 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]]: - r""" List Staging Tables - - List all DuckDB staging tables with comprehensive metrics and status. - - **Purpose:** - Get a complete inventory of all staging tables for a graph, including - file counts, storage sizes, and row estimates. Essential for monitoring - the data pipeline and determining which tables are ready for ingestion. - - **What You Get:** - - Table name and type (node/relationship) - - File count per table - - Total storage size in bytes - - Estimated row count - - S3 location pattern - - Ready-for-ingestion status - - **Use Cases:** - - Monitor data upload progress - - Check which tables have files ready - - Track storage consumption - - Validate pipeline before ingestion - - Capacity planning - - **Workflow:** - 1. List tables to see current state - 2. Upload files to empty tables - 3. Re-list to verify uploads - 4. Check file counts and sizes - 5. Ingest when ready - - **Example Response:** - ```json - { - \"tables\": [ - { - \"table_name\": \"Entity\", - \"row_count\": 5000, - \"file_count\": 3, - \"total_size_bytes\": 2457600, - \"s3_location\": \"s3://bucket/user-staging/user123/graph456/Entity/**/*.parquet\" - }, - { - \"table_name\": \"Transaction\", - \"row_count\": 15000, - \"file_count\": 5, - \"total_size_bytes\": 8192000, - \"s3_location\": \"s3://bucket/user-staging/user123/graph456/Transaction/**/*.parquet\" - } - ], - \"total_count\": 2 - } - ``` - - **Example Usage:** - ```bash - curl -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables - ``` - - **Tips:** - - Tables with `file_count > 0` have data ready - - Check `total_size_bytes` for storage monitoring - - Use `s3_location` to verify upload paths - - Empty tables (file_count=0) are skipped during ingestion - - **Note:** - Table queries are included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]] - """ + """List Staging Tables + + List all DuckDB staging tables with comprehensive metrics and status. + + Get a complete inventory of all staging tables for a graph, including + file counts, storage sizes, and row estimates. Essential for monitoring + the data pipeline and determining which tables are ready for ingestion. + + **Returned Metrics:** + - Table name and type (node/relationship) + - File count per table + - Total storage size in bytes + - Estimated row count + - S3 location pattern + - Ready-for-ingestion status + + **Use Cases:** + - Monitor data upload progress + - Check which tables have files ready + - Track storage consumption + - Validate pipeline before ingestion + - Capacity planning + + **Workflow:** + 1. List tables to see current state + 2. Upload files to empty tables + 3. Re-list to verify uploads + 4. Check file counts and sizes + 5. Ingest when ready + + **Important Notes:** + - Tables with `file_count > 0` have data ready + - Check `total_size_bytes` for storage monitoring + - Use `s3_location` to verify upload paths + - Empty tables (file_count=0) are skipped during ingestion + - Table queries are included - no credit consumption + + Args: + graph_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]] + """ kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -196,96 +138,58 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]]: - r""" List Staging Tables - - List all DuckDB staging tables with comprehensive metrics and status. - - **Purpose:** - Get a complete inventory of all staging tables for a graph, including - file counts, storage sizes, and row estimates. Essential for monitoring - the data pipeline and determining which tables are ready for ingestion. - - **What You Get:** - - Table name and type (node/relationship) - - File count per table - - Total storage size in bytes - - Estimated row count - - S3 location pattern - - Ready-for-ingestion status - - **Use Cases:** - - Monitor data upload progress - - Check which tables have files ready - - Track storage consumption - - Validate pipeline before ingestion - - Capacity planning - - **Workflow:** - 1. List tables to see current state - 2. Upload files to empty tables - 3. Re-list to verify uploads - 4. Check file counts and sizes - 5. Ingest when ready - - **Example Response:** - ```json - { - \"tables\": [ - { - \"table_name\": \"Entity\", - \"row_count\": 5000, - \"file_count\": 3, - \"total_size_bytes\": 2457600, - \"s3_location\": \"s3://bucket/user-staging/user123/graph456/Entity/**/*.parquet\" - }, - { - \"table_name\": \"Transaction\", - \"row_count\": 15000, - \"file_count\": 5, - \"total_size_bytes\": 8192000, - \"s3_location\": \"s3://bucket/user-staging/user123/graph456/Transaction/**/*.parquet\" - } - ], - \"total_count\": 2 - } - ``` - - **Example Usage:** - ```bash - curl -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables - ``` - - **Tips:** - - Tables with `file_count > 0` have data ready - - Check `total_size_bytes` for storage monitoring - - Use `s3_location` to verify upload paths - - Empty tables (file_count=0) are skipped during ingestion - - **Note:** - Table queries are included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, ErrorResponse, HTTPValidationError, TableListResponse] - """ + """List Staging Tables + + List all DuckDB staging tables with comprehensive metrics and status. + + Get a complete inventory of all staging tables for a graph, including + file counts, storage sizes, and row estimates. Essential for monitoring + the data pipeline and determining which tables are ready for ingestion. + + **Returned Metrics:** + - Table name and type (node/relationship) + - File count per table + - Total storage size in bytes + - Estimated row count + - S3 location pattern + - Ready-for-ingestion status + + **Use Cases:** + - Monitor data upload progress + - Check which tables have files ready + - Track storage consumption + - Validate pipeline before ingestion + - Capacity planning + + **Workflow:** + 1. List tables to see current state + 2. Upload files to empty tables + 3. Re-list to verify uploads + 4. Check file counts and sizes + 5. Ingest when ready + + **Important Notes:** + - Tables with `file_count > 0` have data ready + - Check `total_size_bytes` for storage monitoring + - Use `s3_location` to verify upload paths + - Empty tables (file_count=0) are skipped during ingestion + - Table queries are included - no credit consumption + + Args: + graph_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ErrorResponse, HTTPValidationError, TableListResponse] + """ return sync_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -293,95 +197,57 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]]: - r""" List Staging Tables - - List all DuckDB staging tables with comprehensive metrics and status. - - **Purpose:** - Get a complete inventory of all staging tables for a graph, including - file counts, storage sizes, and row estimates. Essential for monitoring - the data pipeline and determining which tables are ready for ingestion. - - **What You Get:** - - Table name and type (node/relationship) - - File count per table - - Total storage size in bytes - - Estimated row count - - S3 location pattern - - Ready-for-ingestion status - - **Use Cases:** - - Monitor data upload progress - - Check which tables have files ready - - Track storage consumption - - Validate pipeline before ingestion - - Capacity planning - - **Workflow:** - 1. List tables to see current state - 2. Upload files to empty tables - 3. Re-list to verify uploads - 4. Check file counts and sizes - 5. Ingest when ready - - **Example Response:** - ```json - { - \"tables\": [ - { - \"table_name\": \"Entity\", - \"row_count\": 5000, - \"file_count\": 3, - \"total_size_bytes\": 2457600, - \"s3_location\": \"s3://bucket/user-staging/user123/graph456/Entity/**/*.parquet\" - }, - { - \"table_name\": \"Transaction\", - \"row_count\": 15000, - \"file_count\": 5, - \"total_size_bytes\": 8192000, - \"s3_location\": \"s3://bucket/user-staging/user123/graph456/Transaction/**/*.parquet\" - } - ], - \"total_count\": 2 - } - ``` - - **Example Usage:** - ```bash - curl -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables - ``` - - **Tips:** - - Tables with `file_count > 0` have data ready - - Check `total_size_bytes` for storage monitoring - - Use `s3_location` to verify upload paths - - Empty tables (file_count=0) are skipped during ingestion - - **Note:** - Table queries are included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]] - """ + """List Staging Tables + + List all DuckDB staging tables with comprehensive metrics and status. + + Get a complete inventory of all staging tables for a graph, including + file counts, storage sizes, and row estimates. Essential for monitoring + the data pipeline and determining which tables are ready for ingestion. + + **Returned Metrics:** + - Table name and type (node/relationship) + - File count per table + - Total storage size in bytes + - Estimated row count + - S3 location pattern + - Ready-for-ingestion status + + **Use Cases:** + - Monitor data upload progress + - Check which tables have files ready + - Track storage consumption + - Validate pipeline before ingestion + - Capacity planning + + **Workflow:** + 1. List tables to see current state + 2. Upload files to empty tables + 3. Re-list to verify uploads + 4. Check file counts and sizes + 5. Ingest when ready + + **Important Notes:** + - Tables with `file_count > 0` have data ready + - Check `total_size_bytes` for storage monitoring + - Use `s3_location` to verify upload paths + - Empty tables (file_count=0) are skipped during ingestion + - Table queries are included - no credit consumption + + Args: + graph_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]] + """ kwargs = _get_kwargs( graph_id=graph_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -393,96 +259,58 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError, TableListResponse]]: - r""" List Staging Tables - - List all DuckDB staging tables with comprehensive metrics and status. - - **Purpose:** - Get a complete inventory of all staging tables for a graph, including - file counts, storage sizes, and row estimates. Essential for monitoring - the data pipeline and determining which tables are ready for ingestion. - - **What You Get:** - - Table name and type (node/relationship) - - File count per table - - Total storage size in bytes - - Estimated row count - - S3 location pattern - - Ready-for-ingestion status - - **Use Cases:** - - Monitor data upload progress - - Check which tables have files ready - - Track storage consumption - - Validate pipeline before ingestion - - Capacity planning - - **Workflow:** - 1. List tables to see current state - 2. Upload files to empty tables - 3. Re-list to verify uploads - 4. Check file counts and sizes - 5. Ingest when ready - - **Example Response:** - ```json - { - \"tables\": [ - { - \"table_name\": \"Entity\", - \"row_count\": 5000, - \"file_count\": 3, - \"total_size_bytes\": 2457600, - \"s3_location\": \"s3://bucket/user-staging/user123/graph456/Entity/**/*.parquet\" - }, - { - \"table_name\": \"Transaction\", - \"row_count\": 15000, - \"file_count\": 5, - \"total_size_bytes\": 8192000, - \"s3_location\": \"s3://bucket/user-staging/user123/graph456/Transaction/**/*.parquet\" - } - ], - \"total_count\": 2 - } - ``` - - **Example Usage:** - ```bash - curl -H \"Authorization: Bearer YOUR_TOKEN\" \ - https://api.robosystems.ai/v1/graphs/kg123/tables - ``` - - **Tips:** - - Tables with `file_count > 0` have data ready - - Check `total_size_bytes` for storage monitoring - - Use `s3_location` to verify upload paths - - Empty tables (file_count=0) are skipped during ingestion - - **Note:** - Table queries are included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, ErrorResponse, HTTPValidationError, TableListResponse] - """ + """List Staging Tables + + List all DuckDB staging tables with comprehensive metrics and status. + + Get a complete inventory of all staging tables for a graph, including + file counts, storage sizes, and row estimates. Essential for monitoring + the data pipeline and determining which tables are ready for ingestion. + + **Returned Metrics:** + - Table name and type (node/relationship) + - File count per table + - Total storage size in bytes + - Estimated row count + - S3 location pattern + - Ready-for-ingestion status + + **Use Cases:** + - Monitor data upload progress + - Check which tables have files ready + - Track storage consumption + - Validate pipeline before ingestion + - Capacity planning + + **Workflow:** + 1. List tables to see current state + 2. Upload files to empty tables + 3. Re-list to verify uploads + 4. Check file counts and sizes + 5. Ingest when ready + + **Important Notes:** + - Tables with `file_count > 0` have data ready + - Check `total_size_bytes` for storage monitoring + - Use `s3_location` to verify upload paths + - Empty tables (file_count=0) are skipped during ingestion + - Table queries are included - no credit consumption + + Args: + graph_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ErrorResponse, HTTPValidationError, TableListResponse] + """ return ( await asyncio_detailed( graph_id=graph_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/tables/query_tables.py b/robosystems_client/api/tables/query_tables.py index 9d07827..0999e17 100644 --- a/robosystems_client/api/tables/query_tables.py +++ b/robosystems_client/api/tables/query_tables.py @@ -9,35 +9,19 @@ from ...models.http_validation_error import HTTPValidationError from ...models.table_query_request import TableQueryRequest from ...models.table_query_response import TableQueryResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( graph_id: str, *, body: TableQueryRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/graphs/{graph_id}/tables/query", - "params": params, } _kwargs["json"] = body.to_dict() @@ -110,17 +94,23 @@ def sync_detailed( *, client: AuthenticatedClient, body: TableQueryRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]: - """Query Staging Tables with SQL + r"""Query Staging Tables with SQL Execute SQL queries on DuckDB staging tables for data inspection and validation. - **Purpose:** Query raw staging data directly with SQL before ingestion into the graph database. Useful for data quality checks, validation, and exploratory analysis. + **Security Best Practice - Use Parameterized Queries:** + ALWAYS use query parameters instead of string concatenation to prevent SQL injection: + - āœ… SAFE: `SELECT * FROM Entity WHERE type = ? LIMIT ?` with `parameters: [\"Company\", 100]` + - āŒ UNSAFE: `SELECT * FROM Entity WHERE type = 'Company' LIMIT 100` with user input concatenated + into SQL string + + Query parameters provide automatic escaping and type safety. Use `?` placeholders with parameters + array. + **Use Cases:** - Validate data quality before graph ingestion - Inspect row-level data for debugging @@ -140,27 +130,15 @@ def sync_detailed( - Aggregations, window functions, CTEs - Multiple table joins across staging area - **Example Queries:** - ```sql - -- Count rows in staging table - SELECT COUNT(*) FROM Entity; - - -- Check for nulls - SELECT * FROM Entity WHERE name IS NULL LIMIT 10; - - -- Find duplicates - SELECT identifier, COUNT(*) as cnt - FROM Entity - GROUP BY identifier - HAVING COUNT(*) > 1; - - -- Join across tables - SELECT e.name, COUNT(t.id) as transaction_count - FROM Entity e - LEFT JOIN Transaction t ON e.identifier = t.entity_id - GROUP BY e.name - ORDER BY transaction_count DESC; - ``` + **Common Operations:** + - Count rows: `SELECT COUNT(*) FROM Entity` + - Filter by type: `SELECT * FROM Entity WHERE entity_type = ? LIMIT ?` with `parameters: + [\"Company\", 100]` + - Check for nulls: `SELECT * FROM Entity WHERE name IS NULL LIMIT 10` + - Find duplicates: `SELECT identifier, COUNT(*) as cnt FROM Entity GROUP BY identifier HAVING + COUNT(*) > 1` + - Filter amounts: `SELECT * FROM Transaction WHERE amount > ? AND date >= ?` with `parameters: + [1000, \"2024-01-01\"]` **Limits:** - Query timeout: 30 seconds @@ -173,12 +151,10 @@ def sync_detailed( Use the graph query endpoint instead: `POST /v1/graphs/{graph_id}/query` **Note:** - Staging table queries are included - no credit consumption. + Staging table queries are included - no credit consumption Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (TableQueryRequest): Raises: @@ -192,8 +168,6 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -208,17 +182,23 @@ def sync( *, client: AuthenticatedClient, body: TableQueryRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]: - """Query Staging Tables with SQL + r"""Query Staging Tables with SQL Execute SQL queries on DuckDB staging tables for data inspection and validation. - **Purpose:** Query raw staging data directly with SQL before ingestion into the graph database. Useful for data quality checks, validation, and exploratory analysis. + **Security Best Practice - Use Parameterized Queries:** + ALWAYS use query parameters instead of string concatenation to prevent SQL injection: + - āœ… SAFE: `SELECT * FROM Entity WHERE type = ? LIMIT ?` with `parameters: [\"Company\", 100]` + - āŒ UNSAFE: `SELECT * FROM Entity WHERE type = 'Company' LIMIT 100` with user input concatenated + into SQL string + + Query parameters provide automatic escaping and type safety. Use `?` placeholders with parameters + array. + **Use Cases:** - Validate data quality before graph ingestion - Inspect row-level data for debugging @@ -238,27 +218,15 @@ def sync( - Aggregations, window functions, CTEs - Multiple table joins across staging area - **Example Queries:** - ```sql - -- Count rows in staging table - SELECT COUNT(*) FROM Entity; - - -- Check for nulls - SELECT * FROM Entity WHERE name IS NULL LIMIT 10; - - -- Find duplicates - SELECT identifier, COUNT(*) as cnt - FROM Entity - GROUP BY identifier - HAVING COUNT(*) > 1; - - -- Join across tables - SELECT e.name, COUNT(t.id) as transaction_count - FROM Entity e - LEFT JOIN Transaction t ON e.identifier = t.entity_id - GROUP BY e.name - ORDER BY transaction_count DESC; - ``` + **Common Operations:** + - Count rows: `SELECT COUNT(*) FROM Entity` + - Filter by type: `SELECT * FROM Entity WHERE entity_type = ? LIMIT ?` with `parameters: + [\"Company\", 100]` + - Check for nulls: `SELECT * FROM Entity WHERE name IS NULL LIMIT 10` + - Find duplicates: `SELECT identifier, COUNT(*) as cnt FROM Entity GROUP BY identifier HAVING + COUNT(*) > 1` + - Filter amounts: `SELECT * FROM Transaction WHERE amount > ? AND date >= ?` with `parameters: + [1000, \"2024-01-01\"]` **Limits:** - Query timeout: 30 seconds @@ -271,12 +239,10 @@ def sync( Use the graph query endpoint instead: `POST /v1/graphs/{graph_id}/query` **Note:** - Staging table queries are included - no credit consumption. + Staging table queries are included - no credit consumption Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (TableQueryRequest): Raises: @@ -291,8 +257,6 @@ def sync( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -301,17 +265,23 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: TableQueryRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]: - """Query Staging Tables with SQL + r"""Query Staging Tables with SQL Execute SQL queries on DuckDB staging tables for data inspection and validation. - **Purpose:** Query raw staging data directly with SQL before ingestion into the graph database. Useful for data quality checks, validation, and exploratory analysis. + **Security Best Practice - Use Parameterized Queries:** + ALWAYS use query parameters instead of string concatenation to prevent SQL injection: + - āœ… SAFE: `SELECT * FROM Entity WHERE type = ? LIMIT ?` with `parameters: [\"Company\", 100]` + - āŒ UNSAFE: `SELECT * FROM Entity WHERE type = 'Company' LIMIT 100` with user input concatenated + into SQL string + + Query parameters provide automatic escaping and type safety. Use `?` placeholders with parameters + array. + **Use Cases:** - Validate data quality before graph ingestion - Inspect row-level data for debugging @@ -331,27 +301,15 @@ async def asyncio_detailed( - Aggregations, window functions, CTEs - Multiple table joins across staging area - **Example Queries:** - ```sql - -- Count rows in staging table - SELECT COUNT(*) FROM Entity; - - -- Check for nulls - SELECT * FROM Entity WHERE name IS NULL LIMIT 10; - - -- Find duplicates - SELECT identifier, COUNT(*) as cnt - FROM Entity - GROUP BY identifier - HAVING COUNT(*) > 1; - - -- Join across tables - SELECT e.name, COUNT(t.id) as transaction_count - FROM Entity e - LEFT JOIN Transaction t ON e.identifier = t.entity_id - GROUP BY e.name - ORDER BY transaction_count DESC; - ``` + **Common Operations:** + - Count rows: `SELECT COUNT(*) FROM Entity` + - Filter by type: `SELECT * FROM Entity WHERE entity_type = ? LIMIT ?` with `parameters: + [\"Company\", 100]` + - Check for nulls: `SELECT * FROM Entity WHERE name IS NULL LIMIT 10` + - Find duplicates: `SELECT identifier, COUNT(*) as cnt FROM Entity GROUP BY identifier HAVING + COUNT(*) > 1` + - Filter amounts: `SELECT * FROM Transaction WHERE amount > ? AND date >= ?` with `parameters: + [1000, \"2024-01-01\"]` **Limits:** - Query timeout: 30 seconds @@ -364,12 +322,10 @@ async def asyncio_detailed( Use the graph query endpoint instead: `POST /v1/graphs/{graph_id}/query` **Note:** - Staging table queries are included - no credit consumption. + Staging table queries are included - no credit consumption Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (TableQueryRequest): Raises: @@ -383,8 +339,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -397,17 +351,23 @@ async def asyncio( *, client: AuthenticatedClient, body: TableQueryRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]: - """Query Staging Tables with SQL + r"""Query Staging Tables with SQL Execute SQL queries on DuckDB staging tables for data inspection and validation. - **Purpose:** Query raw staging data directly with SQL before ingestion into the graph database. Useful for data quality checks, validation, and exploratory analysis. + **Security Best Practice - Use Parameterized Queries:** + ALWAYS use query parameters instead of string concatenation to prevent SQL injection: + - āœ… SAFE: `SELECT * FROM Entity WHERE type = ? LIMIT ?` with `parameters: [\"Company\", 100]` + - āŒ UNSAFE: `SELECT * FROM Entity WHERE type = 'Company' LIMIT 100` with user input concatenated + into SQL string + + Query parameters provide automatic escaping and type safety. Use `?` placeholders with parameters + array. + **Use Cases:** - Validate data quality before graph ingestion - Inspect row-level data for debugging @@ -427,27 +387,15 @@ async def asyncio( - Aggregations, window functions, CTEs - Multiple table joins across staging area - **Example Queries:** - ```sql - -- Count rows in staging table - SELECT COUNT(*) FROM Entity; - - -- Check for nulls - SELECT * FROM Entity WHERE name IS NULL LIMIT 10; - - -- Find duplicates - SELECT identifier, COUNT(*) as cnt - FROM Entity - GROUP BY identifier - HAVING COUNT(*) > 1; - - -- Join across tables - SELECT e.name, COUNT(t.id) as transaction_count - FROM Entity e - LEFT JOIN Transaction t ON e.identifier = t.entity_id - GROUP BY e.name - ORDER BY transaction_count DESC; - ``` + **Common Operations:** + - Count rows: `SELECT COUNT(*) FROM Entity` + - Filter by type: `SELECT * FROM Entity WHERE entity_type = ? LIMIT ?` with `parameters: + [\"Company\", 100]` + - Check for nulls: `SELECT * FROM Entity WHERE name IS NULL LIMIT 10` + - Find duplicates: `SELECT identifier, COUNT(*) as cnt FROM Entity GROUP BY identifier HAVING + COUNT(*) > 1` + - Filter amounts: `SELECT * FROM Transaction WHERE amount > ? AND date >= ?` with `parameters: + [1000, \"2024-01-01\"]` **Limits:** - Query timeout: 30 seconds @@ -460,12 +408,10 @@ async def asyncio( Use the graph query endpoint instead: `POST /v1/graphs/{graph_id}/query` **Note:** - Staging table queries are included - no credit consumption. + Staging table queries are included - no credit consumption Args: - graph_id (str): Graph database identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): + graph_id (str): body (TableQueryRequest): Raises: @@ -481,7 +427,5 @@ async def asyncio( graph_id=graph_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/tables/update_file_status.py b/robosystems_client/api/tables/update_file_status.py index a0d0ad7..ef41761 100644 --- a/robosystems_client/api/tables/update_file_status.py +++ b/robosystems_client/api/tables/update_file_status.py @@ -11,7 +11,7 @@ from ...models.update_file_status_response_updatefilestatus import ( UpdateFileStatusResponseUpdatefilestatus, ) -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( @@ -19,28 +19,12 @@ def _get_kwargs( file_id: str, *, body: FileStatusUpdate, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "patch", "url": f"/v1/graphs/{graph_id}/tables/files/{file_id}", - "params": params, } _kwargs["json"] = body.to_dict() @@ -123,99 +107,67 @@ def sync_detailed( *, client: AuthenticatedClient, body: FileStatusUpdate, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus ] ]: - r""" Update File Upload Status - - Update file status after upload completes. - - **Purpose:** - Mark files as uploaded after successful S3 upload. The backend validates - the file, calculates size and row count, enforces storage limits, and - registers the DuckDB table for queries. - - **Status Values:** - - `uploaded`: File successfully uploaded to S3 (triggers validation) - - `disabled`: Exclude file from ingestion - - `archived`: Soft delete file - - **What Happens on 'uploaded' Status:** - 1. Verify file exists in S3 - 2. Calculate actual file size - 3. Enforce tier storage limits - 4. Calculate or estimate row count - 5. Update table statistics - 6. Register DuckDB external table - 7. File ready for ingestion - - **Row Count Calculation:** - - **Parquet**: Exact count from file metadata - - **CSV**: Count rows (minus header) - - **JSON**: Count array elements - - **Fallback**: Estimate from file size if reading fails - - **Storage Limits:** - Enforced per subscription tier: - - Prevents uploads exceeding tier limit - - Returns HTTP 413 if limit exceeded - - Check current usage before large uploads - - **Example Response:** - ```json - { - \"status\": \"success\", - \"file_id\": \"f123\", - \"upload_status\": \"uploaded\", - \"file_size_bytes\": 1048576, - \"row_count\": 5000, - \"message\": \"File validated and ready for ingestion\" - } - ``` - - **Example Usage:** - ```bash - # After uploading file to S3 presigned URL - curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{\"status\": \"uploaded\"}' - ``` - - **Tips:** - - Always call this after S3 upload completes - - Check response for actual row count - - Storage limit errors (413) mean tier upgrade needed - - DuckDB registration failures are non-fatal (retried later) - - **Note:** - Status updates are included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - file_id (str): File identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - body (FileStatusUpdate): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus]] - """ + """Update File Upload Status + + Update file status after upload completes. + + Marks files as uploaded after successful S3 upload. The backend validates + the file, calculates size and row count, enforces storage limits, and + registers the DuckDB table for queries. + + **Status Values:** + - `uploaded`: File successfully uploaded to S3 (triggers validation) + - `disabled`: Exclude file from ingestion + - `archived`: Soft delete file + + **What Happens on 'uploaded' Status:** + 1. Verify file exists in S3 + 2. Calculate actual file size + 3. Enforce tier storage limits + 4. Calculate or estimate row count + 5. Update table statistics + 6. Register DuckDB external table + 7. File ready for ingestion + + **Row Count Calculation:** + - **Parquet**: Exact count from file metadata + - **CSV**: Count rows (minus header) + - **JSON**: Count array elements + - **Fallback**: Estimate from file size if reading fails + + **Storage Limits:** + Enforced per subscription tier. Returns HTTP 413 if limit exceeded. + Check current usage before large uploads. + + **Important Notes:** + - Always call this after S3 upload completes + - Check response for actual row count + - Storage limit errors (413) mean tier upgrade needed + - DuckDB registration failures are non-fatal (retried later) + - Status updates are included - no credit consumption + + Args: + graph_id (str): + file_id (str): File identifier + body (FileStatusUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus]] + """ kwargs = _get_kwargs( graph_id=graph_id, file_id=file_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -231,100 +183,68 @@ def sync( *, client: AuthenticatedClient, body: FileStatusUpdate, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus ] ]: - r""" Update File Upload Status - - Update file status after upload completes. - - **Purpose:** - Mark files as uploaded after successful S3 upload. The backend validates - the file, calculates size and row count, enforces storage limits, and - registers the DuckDB table for queries. - - **Status Values:** - - `uploaded`: File successfully uploaded to S3 (triggers validation) - - `disabled`: Exclude file from ingestion - - `archived`: Soft delete file - - **What Happens on 'uploaded' Status:** - 1. Verify file exists in S3 - 2. Calculate actual file size - 3. Enforce tier storage limits - 4. Calculate or estimate row count - 5. Update table statistics - 6. Register DuckDB external table - 7. File ready for ingestion - - **Row Count Calculation:** - - **Parquet**: Exact count from file metadata - - **CSV**: Count rows (minus header) - - **JSON**: Count array elements - - **Fallback**: Estimate from file size if reading fails - - **Storage Limits:** - Enforced per subscription tier: - - Prevents uploads exceeding tier limit - - Returns HTTP 413 if limit exceeded - - Check current usage before large uploads - - **Example Response:** - ```json - { - \"status\": \"success\", - \"file_id\": \"f123\", - \"upload_status\": \"uploaded\", - \"file_size_bytes\": 1048576, - \"row_count\": 5000, - \"message\": \"File validated and ready for ingestion\" - } - ``` - - **Example Usage:** - ```bash - # After uploading file to S3 presigned URL - curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{\"status\": \"uploaded\"}' - ``` - - **Tips:** - - Always call this after S3 upload completes - - Check response for actual row count - - Storage limit errors (413) mean tier upgrade needed - - DuckDB registration failures are non-fatal (retried later) - - **Note:** - Status updates are included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - file_id (str): File identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - body (FileStatusUpdate): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus] - """ + """Update File Upload Status + + Update file status after upload completes. + + Marks files as uploaded after successful S3 upload. The backend validates + the file, calculates size and row count, enforces storage limits, and + registers the DuckDB table for queries. + + **Status Values:** + - `uploaded`: File successfully uploaded to S3 (triggers validation) + - `disabled`: Exclude file from ingestion + - `archived`: Soft delete file + + **What Happens on 'uploaded' Status:** + 1. Verify file exists in S3 + 2. Calculate actual file size + 3. Enforce tier storage limits + 4. Calculate or estimate row count + 5. Update table statistics + 6. Register DuckDB external table + 7. File ready for ingestion + + **Row Count Calculation:** + - **Parquet**: Exact count from file metadata + - **CSV**: Count rows (minus header) + - **JSON**: Count array elements + - **Fallback**: Estimate from file size if reading fails + + **Storage Limits:** + Enforced per subscription tier. Returns HTTP 413 if limit exceeded. + Check current usage before large uploads. + + **Important Notes:** + - Always call this after S3 upload completes + - Check response for actual row count + - Storage limit errors (413) mean tier upgrade needed + - DuckDB registration failures are non-fatal (retried later) + - Status updates are included - no credit consumption + + Args: + graph_id (str): + file_id (str): File identifier + body (FileStatusUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus] + """ return sync_detailed( graph_id=graph_id, file_id=file_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -334,99 +254,67 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: FileStatusUpdate, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus ] ]: - r""" Update File Upload Status - - Update file status after upload completes. - - **Purpose:** - Mark files as uploaded after successful S3 upload. The backend validates - the file, calculates size and row count, enforces storage limits, and - registers the DuckDB table for queries. - - **Status Values:** - - `uploaded`: File successfully uploaded to S3 (triggers validation) - - `disabled`: Exclude file from ingestion - - `archived`: Soft delete file - - **What Happens on 'uploaded' Status:** - 1. Verify file exists in S3 - 2. Calculate actual file size - 3. Enforce tier storage limits - 4. Calculate or estimate row count - 5. Update table statistics - 6. Register DuckDB external table - 7. File ready for ingestion - - **Row Count Calculation:** - - **Parquet**: Exact count from file metadata - - **CSV**: Count rows (minus header) - - **JSON**: Count array elements - - **Fallback**: Estimate from file size if reading fails - - **Storage Limits:** - Enforced per subscription tier: - - Prevents uploads exceeding tier limit - - Returns HTTP 413 if limit exceeded - - Check current usage before large uploads - - **Example Response:** - ```json - { - \"status\": \"success\", - \"file_id\": \"f123\", - \"upload_status\": \"uploaded\", - \"file_size_bytes\": 1048576, - \"row_count\": 5000, - \"message\": \"File validated and ready for ingestion\" - } - ``` - - **Example Usage:** - ```bash - # After uploading file to S3 presigned URL - curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{\"status\": \"uploaded\"}' - ``` - - **Tips:** - - Always call this after S3 upload completes - - Check response for actual row count - - Storage limit errors (413) mean tier upgrade needed - - DuckDB registration failures are non-fatal (retried later) - - **Note:** - Status updates are included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - file_id (str): File identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - body (FileStatusUpdate): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus]] - """ + """Update File Upload Status + + Update file status after upload completes. + + Marks files as uploaded after successful S3 upload. The backend validates + the file, calculates size and row count, enforces storage limits, and + registers the DuckDB table for queries. + + **Status Values:** + - `uploaded`: File successfully uploaded to S3 (triggers validation) + - `disabled`: Exclude file from ingestion + - `archived`: Soft delete file + + **What Happens on 'uploaded' Status:** + 1. Verify file exists in S3 + 2. Calculate actual file size + 3. Enforce tier storage limits + 4. Calculate or estimate row count + 5. Update table statistics + 6. Register DuckDB external table + 7. File ready for ingestion + + **Row Count Calculation:** + - **Parquet**: Exact count from file metadata + - **CSV**: Count rows (minus header) + - **JSON**: Count array elements + - **Fallback**: Estimate from file size if reading fails + + **Storage Limits:** + Enforced per subscription tier. Returns HTTP 413 if limit exceeded. + Check current usage before large uploads. + + **Important Notes:** + - Always call this after S3 upload completes + - Check response for actual row count + - Storage limit errors (413) mean tier upgrade needed + - DuckDB registration failures are non-fatal (retried later) + - Status updates are included - no credit consumption + + Args: + graph_id (str): + file_id (str): File identifier + body (FileStatusUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus]] + """ kwargs = _get_kwargs( graph_id=graph_id, file_id=file_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -440,92 +328,62 @@ async def asyncio( *, client: AuthenticatedClient, body: FileStatusUpdate, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus ] ]: - r""" Update File Upload Status - - Update file status after upload completes. - - **Purpose:** - Mark files as uploaded after successful S3 upload. The backend validates - the file, calculates size and row count, enforces storage limits, and - registers the DuckDB table for queries. - - **Status Values:** - - `uploaded`: File successfully uploaded to S3 (triggers validation) - - `disabled`: Exclude file from ingestion - - `archived`: Soft delete file - - **What Happens on 'uploaded' Status:** - 1. Verify file exists in S3 - 2. Calculate actual file size - 3. Enforce tier storage limits - 4. Calculate or estimate row count - 5. Update table statistics - 6. Register DuckDB external table - 7. File ready for ingestion - - **Row Count Calculation:** - - **Parquet**: Exact count from file metadata - - **CSV**: Count rows (minus header) - - **JSON**: Count array elements - - **Fallback**: Estimate from file size if reading fails - - **Storage Limits:** - Enforced per subscription tier: - - Prevents uploads exceeding tier limit - - Returns HTTP 413 if limit exceeded - - Check current usage before large uploads - - **Example Response:** - ```json - { - \"status\": \"success\", - \"file_id\": \"f123\", - \"upload_status\": \"uploaded\", - \"file_size_bytes\": 1048576, - \"row_count\": 5000, - \"message\": \"File validated and ready for ingestion\" - } - ``` - - **Example Usage:** - ```bash - # After uploading file to S3 presigned URL - curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123\" \ - -H \"Authorization: Bearer YOUR_TOKEN\" \ - -H \"Content-Type: application/json\" \ - -d '{\"status\": \"uploaded\"}' - ``` - - **Tips:** - - Always call this after S3 upload completes - - Check response for actual row count - - Storage limit errors (413) mean tier upgrade needed - - DuckDB registration failures are non-fatal (retried later) - - **Note:** - Status updates are included - no credit consumption. - - Args: - graph_id (str): Graph database identifier - file_id (str): File identifier - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - body (FileStatusUpdate): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus] - """ + """Update File Upload Status + + Update file status after upload completes. + + Marks files as uploaded after successful S3 upload. The backend validates + the file, calculates size and row count, enforces storage limits, and + registers the DuckDB table for queries. + + **Status Values:** + - `uploaded`: File successfully uploaded to S3 (triggers validation) + - `disabled`: Exclude file from ingestion + - `archived`: Soft delete file + + **What Happens on 'uploaded' Status:** + 1. Verify file exists in S3 + 2. Calculate actual file size + 3. Enforce tier storage limits + 4. Calculate or estimate row count + 5. Update table statistics + 6. Register DuckDB external table + 7. File ready for ingestion + + **Row Count Calculation:** + - **Parquet**: Exact count from file metadata + - **CSV**: Count rows (minus header) + - **JSON**: Count array elements + - **Fallback**: Estimate from file size if reading fails + + **Storage Limits:** + Enforced per subscription tier. Returns HTTP 413 if limit exceeded. + Check current usage before large uploads. + + **Important Notes:** + - Always call this after S3 upload completes + - Check response for actual row count + - Storage limit errors (413) mean tier upgrade needed + - DuckDB registration failures are non-fatal (retried later) + - Status updates are included - no credit consumption + + Args: + graph_id (str): + file_id (str): File identifier + body (FileStatusUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus] + """ return ( await asyncio_detailed( @@ -533,7 +391,5 @@ async def asyncio( file_id=file_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/create_user_api_key.py b/robosystems_client/api/user/create_user_api_key.py index 5404825..806835c 100644 --- a/robosystems_client/api/user/create_user_api_key.py +++ b/robosystems_client/api/user/create_user_api_key.py @@ -8,34 +8,18 @@ from ...models.create_api_key_request import CreateAPIKeyRequest from ...models.create_api_key_response import CreateAPIKeyResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( *, body: CreateAPIKeyRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/user/api-keys", - "params": params, } _kwargs["json"] = body.to_dict() @@ -80,16 +64,12 @@ def sync_detailed( *, client: AuthenticatedClient, body: CreateAPIKeyRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[CreateAPIKeyResponse, HTTPValidationError]]: """Create API Key Create a new API key for the current user. Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (CreateAPIKeyRequest): Request model for creating a new API key. Raises: @@ -102,8 +82,6 @@ def sync_detailed( kwargs = _get_kwargs( body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -117,16 +95,12 @@ def sync( *, client: AuthenticatedClient, body: CreateAPIKeyRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[CreateAPIKeyResponse, HTTPValidationError]]: """Create API Key Create a new API key for the current user. Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (CreateAPIKeyRequest): Request model for creating a new API key. Raises: @@ -140,8 +114,6 @@ def sync( return sync_detailed( client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -149,16 +121,12 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: CreateAPIKeyRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[CreateAPIKeyResponse, HTTPValidationError]]: """Create API Key Create a new API key for the current user. Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (CreateAPIKeyRequest): Request model for creating a new API key. Raises: @@ -171,8 +139,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -184,16 +150,12 @@ async def asyncio( *, client: AuthenticatedClient, body: CreateAPIKeyRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[CreateAPIKeyResponse, HTTPValidationError]]: """Create API Key Create a new API key for the current user. Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (CreateAPIKeyRequest): Request model for creating a new API key. Raises: @@ -208,7 +170,5 @@ async def asyncio( await asyncio_detailed( client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/get_all_credit_summaries.py b/robosystems_client/api/user/get_all_credit_summaries.py index 7d8a6eb..cb37909 100644 --- a/robosystems_client/api/user/get_all_credit_summaries.py +++ b/robosystems_client/api/user/get_all_credit_summaries.py @@ -9,49 +9,21 @@ from ...models.get_all_credit_summaries_response_getallcreditsummaries import ( GetAllCreditSummariesResponseGetallcreditsummaries, ) -from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response -def _get_kwargs( - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/credits", - "params": params, } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[ - Union[ - ErrorResponse, - GetAllCreditSummariesResponseGetallcreditsummaries, - HTTPValidationError, - ] -]: +) -> Optional[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]]: if response.status_code == 200: response_200 = GetAllCreditSummariesResponseGetallcreditsummaries.from_dict( response.json() @@ -59,11 +31,6 @@ def _parse_response( return response_200 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if response.status_code == 500: response_500 = ErrorResponse.from_dict(response.json()) @@ -77,13 +44,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[ - Union[ - ErrorResponse, - GetAllCreditSummariesResponseGetallcreditsummaries, - HTTPValidationError, - ] -]: +) -> Response[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -95,15 +56,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[ - Union[ - ErrorResponse, - GetAllCreditSummariesResponseGetallcreditsummaries, - HTTPValidationError, - ] -]: +) -> Response[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]]: """Get All Credit Summaries Get credit summaries for all graphs owned by the user. @@ -114,22 +67,15 @@ def sync_detailed( No credits are consumed for viewing summaries. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries, HTTPValidationError]] + Response[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -141,15 +87,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[ - Union[ - ErrorResponse, - GetAllCreditSummariesResponseGetallcreditsummaries, - HTTPValidationError, - ] -]: +) -> Optional[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]]: """Get All Credit Summaries Get credit summaries for all graphs owned by the user. @@ -160,37 +98,23 @@ def sync( No credits are consumed for viewing summaries. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries, HTTPValidationError] + Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries] """ return sync_detailed( client=client, - token=token, - authorization=authorization, ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[ - Union[ - ErrorResponse, - GetAllCreditSummariesResponseGetallcreditsummaries, - HTTPValidationError, - ] -]: +) -> Response[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]]: """Get All Credit Summaries Get credit summaries for all graphs owned by the user. @@ -201,22 +125,15 @@ async def asyncio_detailed( No credits are consumed for viewing summaries. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries, HTTPValidationError]] + Response[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = await client.get_async_httpx_client().request(**kwargs) @@ -226,15 +143,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[ - Union[ - ErrorResponse, - GetAllCreditSummariesResponseGetallcreditsummaries, - HTTPValidationError, - ] -]: +) -> Optional[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]]: """Get All Credit Summaries Get credit summaries for all graphs owned by the user. @@ -245,22 +154,16 @@ async def asyncio( No credits are consumed for viewing summaries. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries, HTTPValidationError] + Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries] """ return ( await asyncio_detailed( client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/get_current_user.py b/robosystems_client/api/user/get_current_user.py index bb6ae60..a7fc919 100644 --- a/robosystems_client/api/user/get_current_user.py +++ b/robosystems_client/api/user/get_current_user.py @@ -5,54 +5,27 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.http_validation_error import HTTPValidationError from ...models.user_response import UserResponse -from ...types import UNSET, Response, Unset +from ...types import Response -def _get_kwargs( - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user", - "params": params, } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[HTTPValidationError, UserResponse]]: +) -> Optional[UserResponse]: if response.status_code == 200: response_200 = UserResponse.from_dict(response.json()) return response_200 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -61,7 +34,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[HTTPValidationError, UserResponse]]: +) -> Response[UserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,29 +46,20 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[HTTPValidationError, UserResponse]]: +) -> Response[UserResponse]: """Get Current User Returns information about the currently authenticated user. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[HTTPValidationError, UserResponse]] + Response[UserResponse] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -107,58 +71,41 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[HTTPValidationError, UserResponse]]: +) -> Optional[UserResponse]: """Get Current User Returns information about the currently authenticated user. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[HTTPValidationError, UserResponse] + UserResponse """ return sync_detailed( client=client, - token=token, - authorization=authorization, ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[HTTPValidationError, UserResponse]]: +) -> Response[UserResponse]: """Get Current User Returns information about the currently authenticated user. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[HTTPValidationError, UserResponse]] + Response[UserResponse] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = await client.get_async_httpx_client().request(**kwargs) @@ -168,29 +115,21 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[HTTPValidationError, UserResponse]]: +) -> Optional[UserResponse]: """Get Current User Returns information about the currently authenticated user. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[HTTPValidationError, UserResponse] + UserResponse """ return ( await asyncio_detailed( client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/list_user_api_keys.py b/robosystems_client/api/user/list_user_api_keys.py index cfa0e11..f230b12 100644 --- a/robosystems_client/api/user/list_user_api_keys.py +++ b/robosystems_client/api/user/list_user_api_keys.py @@ -6,53 +6,26 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_keys_response import APIKeysResponse -from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response -def _get_kwargs( - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/api-keys", - "params": params, } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[APIKeysResponse, HTTPValidationError]]: +) -> Optional[APIKeysResponse]: if response.status_code == 200: response_200 = APIKeysResponse.from_dict(response.json()) return response_200 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -61,7 +34,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[APIKeysResponse, HTTPValidationError]]: +) -> Response[APIKeysResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,29 +46,20 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[APIKeysResponse, HTTPValidationError]]: +) -> Response[APIKeysResponse]: """List API Keys Get all API keys for the current user. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[APIKeysResponse, HTTPValidationError]] + Response[APIKeysResponse] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -107,58 +71,41 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[APIKeysResponse, HTTPValidationError]]: +) -> Optional[APIKeysResponse]: """List API Keys Get all API keys for the current user. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[APIKeysResponse, HTTPValidationError] + APIKeysResponse """ return sync_detailed( client=client, - token=token, - authorization=authorization, ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[APIKeysResponse, HTTPValidationError]]: +) -> Response[APIKeysResponse]: """List API Keys Get all API keys for the current user. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[APIKeysResponse, HTTPValidationError]] + Response[APIKeysResponse] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = await client.get_async_httpx_client().request(**kwargs) @@ -168,29 +115,21 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[APIKeysResponse, HTTPValidationError]]: +) -> Optional[APIKeysResponse]: """List API Keys Get all API keys for the current user. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[APIKeysResponse, HTTPValidationError] + APIKeysResponse """ return ( await asyncio_detailed( client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/revoke_user_api_key.py b/robosystems_client/api/user/revoke_user_api_key.py index 198c233..698bf20 100644 --- a/robosystems_client/api/user/revoke_user_api_key.py +++ b/robosystems_client/api/user/revoke_user_api_key.py @@ -8,37 +8,17 @@ from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError from ...models.success_response import SuccessResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( api_key_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "delete", "url": f"/v1/user/api-keys/{api_key_id}", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -86,8 +66,6 @@ def sync_detailed( api_key_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Revoke API Key @@ -95,8 +73,6 @@ def sync_detailed( Args: api_key_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -108,8 +84,6 @@ def sync_detailed( kwargs = _get_kwargs( api_key_id=api_key_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -123,8 +97,6 @@ def sync( api_key_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Revoke API Key @@ -132,8 +104,6 @@ def sync( Args: api_key_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -146,8 +116,6 @@ def sync( return sync_detailed( api_key_id=api_key_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -155,8 +123,6 @@ async def asyncio_detailed( api_key_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Revoke API Key @@ -164,8 +130,6 @@ async def asyncio_detailed( Args: api_key_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,8 +141,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( api_key_id=api_key_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -190,8 +152,6 @@ async def asyncio( api_key_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Revoke API Key @@ -199,8 +159,6 @@ async def asyncio( Args: api_key_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -214,7 +172,5 @@ async def asyncio( await asyncio_detailed( api_key_id=api_key_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/update_user.py b/robosystems_client/api/user/update_user.py index 77b9405..e5b7cad 100644 --- a/robosystems_client/api/user/update_user.py +++ b/robosystems_client/api/user/update_user.py @@ -8,34 +8,18 @@ from ...models.http_validation_error import HTTPValidationError from ...models.update_user_request import UpdateUserRequest from ...models.user_response import UserResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( *, body: UpdateUserRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "put", "url": "/v1/user", - "params": params, } _kwargs["json"] = body.to_dict() @@ -80,16 +64,12 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateUserRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserResponse]]: """Update User Profile Update the current user's profile information. Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (UpdateUserRequest): Request model for updating user profile. Raises: @@ -102,8 +82,6 @@ def sync_detailed( kwargs = _get_kwargs( body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -117,16 +95,12 @@ def sync( *, client: AuthenticatedClient, body: UpdateUserRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserResponse]]: """Update User Profile Update the current user's profile information. Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (UpdateUserRequest): Request model for updating user profile. Raises: @@ -140,8 +114,6 @@ def sync( return sync_detailed( client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -149,16 +121,12 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: UpdateUserRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserResponse]]: """Update User Profile Update the current user's profile information. Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (UpdateUserRequest): Request model for updating user profile. Raises: @@ -171,8 +139,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -184,16 +150,12 @@ async def asyncio( *, client: AuthenticatedClient, body: UpdateUserRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserResponse]]: """Update User Profile Update the current user's profile information. Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (UpdateUserRequest): Request model for updating user profile. Raises: @@ -208,7 +170,5 @@ async def asyncio( await asyncio_detailed( client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/update_user_api_key.py b/robosystems_client/api/user/update_user_api_key.py index 37e7009..a9450d2 100644 --- a/robosystems_client/api/user/update_user_api_key.py +++ b/robosystems_client/api/user/update_user_api_key.py @@ -8,35 +8,19 @@ from ...models.api_key_info import APIKeyInfo from ...models.http_validation_error import HTTPValidationError from ...models.update_api_key_request import UpdateAPIKeyRequest -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( api_key_id: str, *, body: UpdateAPIKeyRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "put", "url": f"/v1/user/api-keys/{api_key_id}", - "params": params, } _kwargs["json"] = body.to_dict() @@ -82,8 +66,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAPIKeyRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[APIKeyInfo, HTTPValidationError]]: """Update API Key @@ -91,8 +73,6 @@ def sync_detailed( Args: api_key_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (UpdateAPIKeyRequest): Request model for updating an API key. Raises: @@ -106,8 +86,6 @@ def sync_detailed( kwargs = _get_kwargs( api_key_id=api_key_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -122,8 +100,6 @@ def sync( *, client: AuthenticatedClient, body: UpdateAPIKeyRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[APIKeyInfo, HTTPValidationError]]: """Update API Key @@ -131,8 +107,6 @@ def sync( Args: api_key_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (UpdateAPIKeyRequest): Request model for updating an API key. Raises: @@ -147,8 +121,6 @@ def sync( api_key_id=api_key_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -157,8 +129,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: UpdateAPIKeyRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[APIKeyInfo, HTTPValidationError]]: """Update API Key @@ -166,8 +136,6 @@ async def asyncio_detailed( Args: api_key_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (UpdateAPIKeyRequest): Request model for updating an API key. Raises: @@ -181,8 +149,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( api_key_id=api_key_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -195,8 +161,6 @@ async def asyncio( *, client: AuthenticatedClient, body: UpdateAPIKeyRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[APIKeyInfo, HTTPValidationError]]: """Update API Key @@ -204,8 +168,6 @@ async def asyncio( Args: api_key_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (UpdateAPIKeyRequest): Request model for updating an API key. Raises: @@ -221,7 +183,5 @@ async def asyncio( api_key_id=api_key_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/update_user_password.py b/robosystems_client/api/user/update_user_password.py index b39a29f..c39aca2 100644 --- a/robosystems_client/api/user/update_user_password.py +++ b/robosystems_client/api/user/update_user_password.py @@ -9,34 +9,18 @@ from ...models.http_validation_error import HTTPValidationError from ...models.success_response import SuccessResponse from ...models.update_password_request import UpdatePasswordRequest -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( *, body: UpdatePasswordRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "put", "url": "/v1/user/password", - "params": params, } _kwargs["json"] = body.to_dict() @@ -96,16 +80,12 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdatePasswordRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Update Password Update the current user's password. Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (UpdatePasswordRequest): Request model for updating user password. Raises: @@ -118,8 +98,6 @@ def sync_detailed( kwargs = _get_kwargs( body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -133,16 +111,12 @@ def sync( *, client: AuthenticatedClient, body: UpdatePasswordRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Update Password Update the current user's password. Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (UpdatePasswordRequest): Request model for updating user password. Raises: @@ -156,8 +130,6 @@ def sync( return sync_detailed( client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -165,16 +137,12 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: UpdatePasswordRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Update Password Update the current user's password. Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (UpdatePasswordRequest): Request model for updating user password. Raises: @@ -187,8 +155,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -200,16 +166,12 @@ async def asyncio( *, client: AuthenticatedClient, body: UpdatePasswordRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Update Password Update the current user's password. Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (UpdatePasswordRequest): Request model for updating user password. Raises: @@ -224,7 +186,5 @@ async def asyncio( await asyncio_detailed( client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_analytics/get_detailed_user_analytics.py b/robosystems_client/api/user_analytics/get_detailed_user_analytics.py index 47b4c30..0f83166 100644 --- a/robosystems_client/api/user_analytics/get_detailed_user_analytics.py +++ b/robosystems_client/api/user_analytics/get_detailed_user_analytics.py @@ -14,26 +14,13 @@ def _get_kwargs( *, include_api_stats: Union[Unset, bool] = True, include_recent_activity: Union[Unset, bool] = True, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - params: dict[str, Any] = {} params["include_api_stats"] = include_api_stats params["include_recent_activity"] = include_recent_activity - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -42,7 +29,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -81,8 +67,6 @@ def sync_detailed( client: AuthenticatedClient, include_api_stats: Union[Unset, bool] = True, include_recent_activity: Union[Unset, bool] = True, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserAnalyticsResponse]]: """Get Detailed User Analytics @@ -91,8 +75,6 @@ def sync_detailed( Args: include_api_stats (Union[Unset, bool]): Include API usage statistics Default: True. include_recent_activity (Union[Unset, bool]): Include recent activity Default: True. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -105,8 +87,6 @@ def sync_detailed( kwargs = _get_kwargs( include_api_stats=include_api_stats, include_recent_activity=include_recent_activity, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -121,8 +101,6 @@ def sync( client: AuthenticatedClient, include_api_stats: Union[Unset, bool] = True, include_recent_activity: Union[Unset, bool] = True, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserAnalyticsResponse]]: """Get Detailed User Analytics @@ -131,8 +109,6 @@ def sync( Args: include_api_stats (Union[Unset, bool]): Include API usage statistics Default: True. include_recent_activity (Union[Unset, bool]): Include recent activity Default: True. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -146,8 +122,6 @@ def sync( client=client, include_api_stats=include_api_stats, include_recent_activity=include_recent_activity, - token=token, - authorization=authorization, ).parsed @@ -156,8 +130,6 @@ async def asyncio_detailed( client: AuthenticatedClient, include_api_stats: Union[Unset, bool] = True, include_recent_activity: Union[Unset, bool] = True, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserAnalyticsResponse]]: """Get Detailed User Analytics @@ -166,8 +138,6 @@ async def asyncio_detailed( Args: include_api_stats (Union[Unset, bool]): Include API usage statistics Default: True. include_recent_activity (Union[Unset, bool]): Include recent activity Default: True. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -180,8 +150,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( include_api_stats=include_api_stats, include_recent_activity=include_recent_activity, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -194,8 +162,6 @@ async def asyncio( client: AuthenticatedClient, include_api_stats: Union[Unset, bool] = True, include_recent_activity: Union[Unset, bool] = True, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserAnalyticsResponse]]: """Get Detailed User Analytics @@ -204,8 +170,6 @@ async def asyncio( Args: include_api_stats (Union[Unset, bool]): Include API usage statistics Default: True. include_recent_activity (Union[Unset, bool]): Include recent activity Default: True. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -220,7 +184,5 @@ async def asyncio( client=client, include_api_stats=include_api_stats, include_recent_activity=include_recent_activity, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_analytics/get_user_usage_overview.py b/robosystems_client/api/user_analytics/get_user_usage_overview.py index 4977a53..5776822 100644 --- a/robosystems_client/api/user_analytics/get_user_usage_overview.py +++ b/robosystems_client/api/user_analytics/get_user_usage_overview.py @@ -5,54 +5,27 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.http_validation_error import HTTPValidationError from ...models.user_usage_summary_response import UserUsageSummaryResponse -from ...types import UNSET, Response, Unset +from ...types import Response -def _get_kwargs( - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/analytics/overview", - "params": params, } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[HTTPValidationError, UserUsageSummaryResponse]]: +) -> Optional[UserUsageSummaryResponse]: if response.status_code == 200: response_200 = UserUsageSummaryResponse.from_dict(response.json()) return response_200 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -61,7 +34,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[HTTPValidationError, UserUsageSummaryResponse]]: +) -> Response[UserUsageSummaryResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,29 +46,20 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[HTTPValidationError, UserUsageSummaryResponse]]: +) -> Response[UserUsageSummaryResponse]: """Get User Usage Overview Get a high-level overview of usage statistics for the current user. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[HTTPValidationError, UserUsageSummaryResponse]] + Response[UserUsageSummaryResponse] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -107,58 +71,41 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[HTTPValidationError, UserUsageSummaryResponse]]: +) -> Optional[UserUsageSummaryResponse]: """Get User Usage Overview Get a high-level overview of usage statistics for the current user. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[HTTPValidationError, UserUsageSummaryResponse] + UserUsageSummaryResponse """ return sync_detailed( client=client, - token=token, - authorization=authorization, ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[HTTPValidationError, UserUsageSummaryResponse]]: +) -> Response[UserUsageSummaryResponse]: """Get User Usage Overview Get a high-level overview of usage statistics for the current user. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[HTTPValidationError, UserUsageSummaryResponse]] + Response[UserUsageSummaryResponse] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = await client.get_async_httpx_client().request(**kwargs) @@ -168,29 +115,21 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[HTTPValidationError, UserUsageSummaryResponse]]: +) -> Optional[UserUsageSummaryResponse]: """Get User Usage Overview Get a high-level overview of usage statistics for the current user. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[HTTPValidationError, UserUsageSummaryResponse] + UserUsageSummaryResponse """ return ( await asyncio_detailed( client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_limits/get_all_shared_repository_limits.py b/robosystems_client/api/user_limits/get_all_shared_repository_limits.py index 9e0f1d0..ccd711b 100644 --- a/robosystems_client/api/user_limits/get_all_shared_repository_limits.py +++ b/robosystems_client/api/user_limits/get_all_shared_repository_limits.py @@ -8,48 +8,21 @@ from ...models.get_all_shared_repository_limits_response_getallsharedrepositorylimits import ( GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, ) -from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response -def _get_kwargs( - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/limits/shared-repositories/summary", - "params": params, } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[ - Union[ - GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, - HTTPValidationError, - ] -]: +) -> Optional[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits]: if response.status_code == 200: response_200 = ( GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits.from_dict( @@ -59,11 +32,6 @@ def _parse_response( return response_200 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -72,12 +40,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[ - Union[ - GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, - HTTPValidationError, - ] -]: +) -> Response[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,34 +52,20 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[ - Union[ - GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, - HTTPValidationError, - ] -]: +) -> Response[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits]: """Get all shared repository limits Get rate limit status for all shared repositories the user has access to. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, HTTPValidationError]] + Response[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -128,68 +77,41 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[ - Union[ - GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, - HTTPValidationError, - ] -]: +) -> Optional[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits]: """Get all shared repository limits Get rate limit status for all shared repositories the user has access to. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, HTTPValidationError] + GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits """ return sync_detailed( client=client, - token=token, - authorization=authorization, ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[ - Union[ - GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, - HTTPValidationError, - ] -]: +) -> Response[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits]: """Get all shared repository limits Get rate limit status for all shared repositories the user has access to. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, HTTPValidationError]] + Response[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = await client.get_async_httpx_client().request(**kwargs) @@ -199,34 +121,21 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[ - Union[ - GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, - HTTPValidationError, - ] -]: +) -> Optional[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits]: """Get all shared repository limits Get rate limit status for all shared repositories the user has access to. - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, HTTPValidationError] + GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits """ return ( await asyncio_detailed( client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_limits/get_shared_repository_limits.py b/robosystems_client/api/user_limits/get_shared_repository_limits.py index f1dd015..45d3d52 100644 --- a/robosystems_client/api/user_limits/get_shared_repository_limits.py +++ b/robosystems_client/api/user_limits/get_shared_repository_limits.py @@ -9,37 +9,17 @@ GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, ) from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( repository: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/user/limits/shared-repositories/{repository}", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -83,8 +63,6 @@ def sync_detailed( repository: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] ]: @@ -102,8 +80,6 @@ def sync_detailed( Args: repository (str): Repository name (e.g., 'sec') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -115,8 +91,6 @@ def sync_detailed( kwargs = _get_kwargs( repository=repository, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -130,8 +104,6 @@ def sync( repository: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] ]: @@ -149,8 +121,6 @@ def sync( Args: repository (str): Repository name (e.g., 'sec') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -163,8 +133,6 @@ def sync( return sync_detailed( repository=repository, client=client, - token=token, - authorization=authorization, ).parsed @@ -172,8 +140,6 @@ async def asyncio_detailed( repository: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] ]: @@ -191,8 +157,6 @@ async def asyncio_detailed( Args: repository (str): Repository name (e.g., 'sec') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -204,8 +168,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( repository=repository, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -217,8 +179,6 @@ async def asyncio( repository: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] ]: @@ -236,8 +196,6 @@ async def asyncio( Args: repository (str): Repository name (e.g., 'sec') - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -251,7 +209,5 @@ async def asyncio( await asyncio_detailed( repository=repository, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_limits/get_user_limits.py b/robosystems_client/api/user_limits/get_user_limits.py index 76f3b40..a44e004 100644 --- a/robosystems_client/api/user_limits/get_user_limits.py +++ b/robosystems_client/api/user_limits/get_user_limits.py @@ -5,44 +5,22 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.http_validation_error import HTTPValidationError from ...models.user_limits_response import UserLimitsResponse -from ...types import UNSET, Response, Unset +from ...types import Response -def _get_kwargs( - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/limits", - "params": params, } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, HTTPValidationError, UserLimitsResponse]]: +) -> Optional[Union[Any, UserLimitsResponse]]: if response.status_code == 200: response_200 = UserLimitsResponse.from_dict(response.json()) @@ -52,11 +30,6 @@ def _parse_response( response_404 = cast(Any, None) return response_404 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -65,7 +38,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, HTTPValidationError, UserLimitsResponse]]: +) -> Response[Union[Any, UserLimitsResponse]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -77,29 +50,20 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError, UserLimitsResponse]]: +) -> Response[Union[Any, UserLimitsResponse]]: """Get user limits Retrieve current limits and restrictions for the authenticated user - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, HTTPValidationError, UserLimitsResponse]] + Response[Union[Any, UserLimitsResponse]] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -111,58 +75,41 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError, UserLimitsResponse]]: +) -> Optional[Union[Any, UserLimitsResponse]]: """Get user limits Retrieve current limits and restrictions for the authenticated user - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, HTTPValidationError, UserLimitsResponse] + Union[Any, UserLimitsResponse] """ return sync_detailed( client=client, - token=token, - authorization=authorization, ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError, UserLimitsResponse]]: +) -> Response[Union[Any, UserLimitsResponse]]: """Get user limits Retrieve current limits and restrictions for the authenticated user - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, HTTPValidationError, UserLimitsResponse]] + Response[Union[Any, UserLimitsResponse]] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = await client.get_async_httpx_client().request(**kwargs) @@ -172,29 +119,21 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError, UserLimitsResponse]]: +) -> Optional[Union[Any, UserLimitsResponse]]: """Get user limits Retrieve current limits and restrictions for the authenticated user - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, HTTPValidationError, UserLimitsResponse] + Union[Any, UserLimitsResponse] """ return ( await asyncio_detailed( client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_limits/get_user_usage.py b/robosystems_client/api/user_limits/get_user_usage.py index 1d57807..8efbdaa 100644 --- a/robosystems_client/api/user_limits/get_user_usage.py +++ b/robosystems_client/api/user_limits/get_user_usage.py @@ -5,54 +5,27 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.http_validation_error import HTTPValidationError from ...models.user_usage_response import UserUsageResponse -from ...types import UNSET, Response, Unset +from ...types import Response -def _get_kwargs( - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/limits/usage", - "params": params, } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[HTTPValidationError, UserUsageResponse]]: +) -> Optional[UserUsageResponse]: if response.status_code == 200: response_200 = UserUsageResponse.from_dict(response.json()) return response_200 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -61,7 +34,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[HTTPValidationError, UserUsageResponse]]: +) -> Response[UserUsageResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,29 +46,20 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[HTTPValidationError, UserUsageResponse]]: +) -> Response[UserUsageResponse]: """Get user usage statistics Retrieve current usage statistics and remaining limits for the authenticated user - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[HTTPValidationError, UserUsageResponse]] + Response[UserUsageResponse] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -107,58 +71,41 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[HTTPValidationError, UserUsageResponse]]: +) -> Optional[UserUsageResponse]: """Get user usage statistics Retrieve current usage statistics and remaining limits for the authenticated user - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[HTTPValidationError, UserUsageResponse] + UserUsageResponse """ return sync_detailed( client=client, - token=token, - authorization=authorization, ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[HTTPValidationError, UserUsageResponse]]: +) -> Response[UserUsageResponse]: """Get user usage statistics Retrieve current usage statistics and remaining limits for the authenticated user - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[HTTPValidationError, UserUsageResponse]] + Response[UserUsageResponse] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = await client.get_async_httpx_client().request(**kwargs) @@ -168,29 +115,21 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[HTTPValidationError, UserUsageResponse]]: +) -> Optional[UserUsageResponse]: """Get user usage statistics Retrieve current usage statistics and remaining limits for the authenticated user - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[HTTPValidationError, UserUsageResponse] + UserUsageResponse """ return ( await asyncio_detailed( client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py b/robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py index 1b7eb55..5f8080c 100644 --- a/robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +++ b/robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py @@ -7,37 +7,17 @@ from ...client import AuthenticatedClient, Client from ...models.cancellation_response import CancellationResponse from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( subscription_id: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "delete", "url": f"/v1/user/subscriptions/shared-repositories/{subscription_id}", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -87,8 +67,6 @@ def sync_detailed( subscription_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, CancellationResponse, HTTPValidationError]]: """Cancel Subscription @@ -96,8 +74,6 @@ def sync_detailed( Args: subscription_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -109,8 +85,6 @@ def sync_detailed( kwargs = _get_kwargs( subscription_id=subscription_id, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -124,8 +98,6 @@ def sync( subscription_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, CancellationResponse, HTTPValidationError]]: """Cancel Subscription @@ -133,8 +105,6 @@ def sync( Args: subscription_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -147,8 +117,6 @@ def sync( return sync_detailed( subscription_id=subscription_id, client=client, - token=token, - authorization=authorization, ).parsed @@ -156,8 +124,6 @@ async def asyncio_detailed( subscription_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, CancellationResponse, HTTPValidationError]]: """Cancel Subscription @@ -165,8 +131,6 @@ async def asyncio_detailed( Args: subscription_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -178,8 +142,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( subscription_id=subscription_id, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -191,8 +153,6 @@ async def asyncio( subscription_id: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, CancellationResponse, HTTPValidationError]]: """Cancel Subscription @@ -200,8 +160,6 @@ async def asyncio( Args: subscription_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -215,7 +173,5 @@ async def asyncio( await asyncio_detailed( subscription_id=subscription_id, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_subscriptions/get_repository_credits.py b/robosystems_client/api/user_subscriptions/get_repository_credits.py index 27929b1..e39036b 100644 --- a/robosystems_client/api/user_subscriptions/get_repository_credits.py +++ b/robosystems_client/api/user_subscriptions/get_repository_credits.py @@ -7,37 +7,17 @@ from ...client import AuthenticatedClient, Client from ...models.http_validation_error import HTTPValidationError from ...models.repository_credits_response import RepositoryCreditsResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( repository: str, - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/user/subscriptions/shared-repositories/credits/{repository}", - "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -83,8 +63,6 @@ def sync_detailed( repository: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]: """Get Repository Credits @@ -92,8 +70,6 @@ def sync_detailed( Args: repository (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -105,8 +81,6 @@ def sync_detailed( kwargs = _get_kwargs( repository=repository, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -120,8 +94,6 @@ def sync( repository: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]: """Get Repository Credits @@ -129,8 +101,6 @@ def sync( Args: repository (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -143,8 +113,6 @@ def sync( return sync_detailed( repository=repository, client=client, - token=token, - authorization=authorization, ).parsed @@ -152,8 +120,6 @@ async def asyncio_detailed( repository: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]: """Get Repository Credits @@ -161,8 +127,6 @@ async def asyncio_detailed( Args: repository (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -174,8 +138,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( repository=repository, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -187,8 +149,6 @@ async def asyncio( repository: str, *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]: """Get Repository Credits @@ -196,8 +156,6 @@ async def asyncio( Args: repository (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -211,7 +169,5 @@ async def asyncio( await asyncio_detailed( repository=repository, client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_subscriptions/get_shared_repository_credits.py b/robosystems_client/api/user_subscriptions/get_shared_repository_credits.py index 3879d2e..ccd2ca7 100644 --- a/robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +++ b/robosystems_client/api/user_subscriptions/get_shared_repository_credits.py @@ -6,43 +6,21 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.credits_summary_response import CreditsSummaryResponse -from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset +from ...types import Response -def _get_kwargs( - *, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/subscriptions/shared-repositories/credits", - "params": params, } - _kwargs["headers"] = headers return _kwargs def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, CreditsSummaryResponse, HTTPValidationError]]: +) -> Optional[Union[Any, CreditsSummaryResponse]]: if response.status_code == 200: response_200 = CreditsSummaryResponse.from_dict(response.json()) @@ -52,11 +30,6 @@ def _parse_response( response_401 = cast(Any, None) return response_401 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if response.status_code == 500: response_500 = cast(Any, None) return response_500 @@ -69,7 +42,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, CreditsSummaryResponse, HTTPValidationError]]: +) -> Response[Union[Any, CreditsSummaryResponse]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -81,29 +54,20 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, CreditsSummaryResponse, HTTPValidationError]]: +) -> Response[Union[Any, CreditsSummaryResponse]]: """Get Credit Balances Retrieve credit balances for all shared repository subscriptions - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, CreditsSummaryResponse, HTTPValidationError]] + Response[Union[Any, CreditsSummaryResponse]] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -115,58 +79,41 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, CreditsSummaryResponse, HTTPValidationError]]: +) -> Optional[Union[Any, CreditsSummaryResponse]]: """Get Credit Balances Retrieve credit balances for all shared repository subscriptions - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, CreditsSummaryResponse, HTTPValidationError] + Union[Any, CreditsSummaryResponse] """ return sync_detailed( client=client, - token=token, - authorization=authorization, ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, CreditsSummaryResponse, HTTPValidationError]]: +) -> Response[Union[Any, CreditsSummaryResponse]]: """Get Credit Balances Retrieve credit balances for all shared repository subscriptions - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, CreditsSummaryResponse, HTTPValidationError]] + Response[Union[Any, CreditsSummaryResponse]] """ - kwargs = _get_kwargs( - token=token, - authorization=authorization, - ) + kwargs = _get_kwargs() response = await client.get_async_httpx_client().request(**kwargs) @@ -176,29 +123,21 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, CreditsSummaryResponse, HTTPValidationError]]: +) -> Optional[Union[Any, CreditsSummaryResponse]]: """Get Credit Balances Retrieve credit balances for all shared repository subscriptions - Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): - Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, CreditsSummaryResponse, HTTPValidationError] + Union[Any, CreditsSummaryResponse] """ return ( await asyncio_detailed( client=client, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py b/robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py index 6c612e5..440ee52 100644 --- a/robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +++ b/robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py @@ -13,24 +13,11 @@ def _get_kwargs( *, active_only: Union[Unset, bool] = True, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - params: dict[str, Any] = {} params["active_only"] = active_only - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -39,7 +26,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -85,8 +71,6 @@ def sync_detailed( *, client: AuthenticatedClient, active_only: Union[Unset, bool] = True, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]: """Get User Subscriptions @@ -94,8 +78,6 @@ def sync_detailed( Args: active_only (Union[Unset, bool]): Only return active subscriptions Default: True. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -107,8 +89,6 @@ def sync_detailed( kwargs = _get_kwargs( active_only=active_only, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -122,8 +102,6 @@ def sync( *, client: AuthenticatedClient, active_only: Union[Unset, bool] = True, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]: """Get User Subscriptions @@ -131,8 +109,6 @@ def sync( Args: active_only (Union[Unset, bool]): Only return active subscriptions Default: True. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -145,8 +121,6 @@ def sync( return sync_detailed( client=client, active_only=active_only, - token=token, - authorization=authorization, ).parsed @@ -154,8 +128,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, active_only: Union[Unset, bool] = True, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]: """Get User Subscriptions @@ -163,8 +135,6 @@ async def asyncio_detailed( Args: active_only (Union[Unset, bool]): Only return active subscriptions Default: True. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -176,8 +146,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( active_only=active_only, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -189,8 +157,6 @@ async def asyncio( *, client: AuthenticatedClient, active_only: Union[Unset, bool] = True, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]: """Get User Subscriptions @@ -198,8 +164,6 @@ async def asyncio( Args: active_only (Union[Unset, bool]): Only return active subscriptions Default: True. - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -213,7 +177,5 @@ async def asyncio( await asyncio_detailed( client=client, active_only=active_only, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py b/robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py index 89df698..5fa18db 100644 --- a/robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +++ b/robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py @@ -8,34 +8,18 @@ from ...models.http_validation_error import HTTPValidationError from ...models.subscription_request import SubscriptionRequest from ...models.subscription_response import SubscriptionResponse -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( *, body: SubscriptionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/user/subscriptions/shared-repositories/subscribe", - "params": params, } _kwargs["json"] = body.to_dict() @@ -92,16 +76,12 @@ def sync_detailed( *, client: AuthenticatedClient, body: SubscriptionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, SubscriptionResponse]]: """Subscribe to Shared Repository Create a new subscription to a shared repository add-on with specified tier Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (SubscriptionRequest): Request to create a new subscription. Raises: @@ -114,8 +94,6 @@ def sync_detailed( kwargs = _get_kwargs( body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -129,16 +107,12 @@ def sync( *, client: AuthenticatedClient, body: SubscriptionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, SubscriptionResponse]]: """Subscribe to Shared Repository Create a new subscription to a shared repository add-on with specified tier Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (SubscriptionRequest): Request to create a new subscription. Raises: @@ -152,8 +126,6 @@ def sync( return sync_detailed( client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -161,16 +133,12 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: SubscriptionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, SubscriptionResponse]]: """Subscribe to Shared Repository Create a new subscription to a shared repository add-on with specified tier Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (SubscriptionRequest): Request to create a new subscription. Raises: @@ -183,8 +151,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -196,16 +162,12 @@ async def asyncio( *, client: AuthenticatedClient, body: SubscriptionRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, SubscriptionResponse]]: """Subscribe to Shared Repository Create a new subscription to a shared repository add-on with specified tier Args: - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (SubscriptionRequest): Request to create a new subscription. Raises: @@ -220,7 +182,5 @@ async def asyncio( await asyncio_detailed( client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py b/robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py index f164970..fe861a7 100644 --- a/robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +++ b/robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py @@ -7,35 +7,19 @@ from ...client import AuthenticatedClient, Client from ...models.http_validation_error import HTTPValidationError from ...models.tier_upgrade_request import TierUpgradeRequest -from ...types import UNSET, Response, Unset +from ...types import Response def _get_kwargs( subscription_id: str, *, body: TierUpgradeRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - params: dict[str, Any] = {} - - json_token: Union[None, Unset, str] - if isinstance(token, Unset): - json_token = UNSET - else: - json_token = token - params["token"] = json_token - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "put", "url": f"/v1/user/subscriptions/shared-repositories/{subscription_id}/upgrade", - "params": params, } _kwargs["json"] = body.to_dict() @@ -96,8 +80,6 @@ def sync_detailed( *, client: AuthenticatedClient, body: TierUpgradeRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: """Upgrade Subscription Tier @@ -105,8 +87,6 @@ def sync_detailed( Args: subscription_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (TierUpgradeRequest): Request to upgrade subscription tier. Raises: @@ -120,8 +100,6 @@ def sync_detailed( kwargs = _get_kwargs( subscription_id=subscription_id, body=body, - token=token, - authorization=authorization, ) response = client.get_httpx_client().request( @@ -136,8 +114,6 @@ def sync( *, client: AuthenticatedClient, body: TierUpgradeRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: """Upgrade Subscription Tier @@ -145,8 +121,6 @@ def sync( Args: subscription_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (TierUpgradeRequest): Request to upgrade subscription tier. Raises: @@ -161,8 +135,6 @@ def sync( subscription_id=subscription_id, client=client, body=body, - token=token, - authorization=authorization, ).parsed @@ -171,8 +143,6 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: TierUpgradeRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: """Upgrade Subscription Tier @@ -180,8 +150,6 @@ async def asyncio_detailed( Args: subscription_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (TierUpgradeRequest): Request to upgrade subscription tier. Raises: @@ -195,8 +163,6 @@ async def asyncio_detailed( kwargs = _get_kwargs( subscription_id=subscription_id, body=body, - token=token, - authorization=authorization, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -209,8 +175,6 @@ async def asyncio( *, client: AuthenticatedClient, body: TierUpgradeRequest, - token: Union[None, Unset, str] = UNSET, - authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: """Upgrade Subscription Tier @@ -218,8 +182,6 @@ async def asyncio( Args: subscription_id (str): - token (Union[None, Unset, str]): JWT token for SSE authentication - authorization (Union[None, Unset, str]): body (TierUpgradeRequest): Request to upgrade subscription tier. Raises: @@ -235,7 +197,5 @@ async def asyncio( subscription_id=subscription_id, client=client, body=body, - token=token, - authorization=authorization, ) ).parsed diff --git a/robosystems_client/extensions/__init__.py b/robosystems_client/extensions/__init__.py index 718f86d..270f1d7 100644 --- a/robosystems_client/extensions/__init__.py +++ b/robosystems_client/extensions/__init__.py @@ -94,6 +94,7 @@ HAS_PANDAS = False DataFrameQueryClient = None # Set placeholders for optional functions + query_result_to_dataframe = None parse_datetime_columns = None _stream_to_dataframe = None dataframe_to_cypher_params = None @@ -189,14 +190,20 @@ def stream_query(graph_id: str, query: str, parameters=None, chunk_size=None): # DataFrame convenience functions (if pandas is available) -if HAS_PANDAS: +if ( + HAS_PANDAS + and query_result_to_dataframe is not None + and _stream_to_dataframe is not None +): def query_to_dataframe(graph_id: str, query: str, parameters=None, **kwargs): """Execute query and return results as pandas DataFrame""" + assert query_result_to_dataframe is not None result = execute_query(graph_id, query, parameters) return query_result_to_dataframe(result, **kwargs) def stream_to_dataframe(graph_id: str, query: str, parameters=None, chunk_size=10000): """Stream query results and return as pandas DataFrame""" + assert _stream_to_dataframe is not None stream = stream_query(graph_id, query, parameters, chunk_size) return _stream_to_dataframe(stream, chunk_size) diff --git a/robosystems_client/extensions/auth_integration.py b/robosystems_client/extensions/auth_integration.py index ca82f42..c4252ba 100644 --- a/robosystems_client/extensions/auth_integration.py +++ b/robosystems_client/extensions/auth_integration.py @@ -60,12 +60,11 @@ def execute_cypher_query( request = CypherQueryRequest(query=query, parameters=parameters or {}) - # Pass the token parameter along with the client + # Execute the query response = sync_detailed( graph_id=graph_id, client=self._authenticated_client, body=request, - token=self._authenticated_client.token, ) if response.parsed: diff --git a/robosystems_client/extensions/query_client.py b/robosystems_client/extensions/query_client.py index a064250..9dfb5d4 100644 --- a/robosystems_client/extensions/query_client.py +++ b/robosystems_client/extensions/query_client.py @@ -476,7 +476,7 @@ def query_batch( self, graph_id: str, queries: List[str], - parameters_list: Optional[List[Dict[str, Any]]] = None, + parameters_list: Optional[List[Optional[Dict[str, Any]]]] = None, parallel: bool = False, ) -> List[Union[QueryResult, Dict[str, Any]]]: """Execute multiple queries in batch @@ -497,7 +497,8 @@ def query_batch( ... ]) """ if parameters_list is None: - parameters_list = [None] * len(queries) + # Create a list of None values for each query + parameters_list = [None for _ in queries] if len(queries) != len(parameters_list): raise ValueError("queries and parameters_list must have same length") diff --git a/robosystems_client/extensions/sse_client.py b/robosystems_client/extensions/sse_client.py index 77e27c0..6251b51 100644 --- a/robosystems_client/extensions/sse_client.py +++ b/robosystems_client/extensions/sse_client.py @@ -53,7 +53,7 @@ class SSEEvent: data: Any id: Optional[str] = None retry: Optional[int] = None - timestamp: datetime = None + timestamp: Optional[datetime] = None def __post_init__(self) -> None: if self.timestamp is None: diff --git a/robosystems_client/extensions/table_ingest_client.py b/robosystems_client/extensions/table_ingest_client.py index d5f839f..de3ad27 100644 --- a/robosystems_client/extensions/table_ingest_client.py +++ b/robosystems_client/extensions/table_ingest_client.py @@ -114,6 +114,9 @@ def upload_parquet_file( file_or_buffer, "read" ) + # Initialize file_path for type checking + file_path: Optional[Path] = None + if is_buffer: # Handle buffer upload file_name = options.file_name or "data.parquet" @@ -218,6 +221,8 @@ def upload_parquet_file( file_content = file_or_buffer.read() else: # Read from file path + if file_path is None: + raise ValueError("file_path should not be None when not using buffer") with open(file_path, "rb") as f: file_content = f.read() diff --git a/robosystems_client/extensions/utils.py b/robosystems_client/extensions/utils.py index a198a33..521942b 100644 --- a/robosystems_client/extensions/utils.py +++ b/robosystems_client/extensions/utils.py @@ -144,7 +144,7 @@ def to_csv( writer.writerow(headers) for row in data: - if isinstance(row, dict): + if isinstance(row, dict) and headers: writer.writerow([row.get(h, "") for h in headers]) elif isinstance(row, (list, tuple)): writer.writerow(row) @@ -159,7 +159,7 @@ def to_csv( writer.writerow(headers) for row in data: - if isinstance(row, dict): + if isinstance(row, dict) and headers: writer.writerow([row.get(h, "") for h in headers]) elif isinstance(row, (list, tuple)): writer.writerow(row) diff --git a/robosystems_client/models/__init__.py b/robosystems_client/models/__init__.py index 4c40b7a..b2e0021 100644 --- a/robosystems_client/models/__init__.py +++ b/robosystems_client/models/__init__.py @@ -124,9 +124,6 @@ from .get_graph_monthly_bill_response_getgraphmonthlybill import ( GetGraphMonthlyBillResponseGetgraphmonthlybill, ) -from .get_graph_schema_response_getgraphschema import ( - GetGraphSchemaResponseGetgraphschema, -) from .get_graph_usage_details_response_getgraphusagedetails import ( GetGraphUsageDetailsResponseGetgraphusagedetails, ) @@ -202,6 +199,8 @@ from .schema_export_response_schema_definition_type_0 import ( SchemaExportResponseSchemaDefinitionType0, ) +from .schema_info_response import SchemaInfoResponse +from .schema_info_response_schema import SchemaInfoResponseSchema from .schema_validation_request import SchemaValidationRequest from .schema_validation_request_schema_definition_type_0 import ( SchemaValidationRequestSchemaDefinitionType0, @@ -361,7 +360,6 @@ "GetGraphBillingHistoryResponseGetgraphbillinghistory", "GetGraphLimitsResponseGetgraphlimits", "GetGraphMonthlyBillResponseGetgraphmonthlybill", - "GetGraphSchemaResponseGetgraphschema", "GetGraphUsageDetailsResponseGetgraphusagedetails", "GetOperationStatusResponseGetoperationstatus", "GetSharedRepositoryLimitsResponseGetsharedrepositorylimits", @@ -417,6 +415,8 @@ "SchemaExportResponse", "SchemaExportResponseDataStatsType0", "SchemaExportResponseSchemaDefinitionType0", + "SchemaInfoResponse", + "SchemaInfoResponseSchema", "SchemaValidationRequest", "SchemaValidationRequestSchemaDefinitionType0", "SchemaValidationResponse", diff --git a/robosystems_client/models/create_graph_request.py b/robosystems_client/models/create_graph_request.py index 45d3b24..8530ca6 100644 --- a/robosystems_client/models/create_graph_request.py +++ b/robosystems_client/models/create_graph_request.py @@ -20,9 +20,10 @@ class CreateGraphRequest: """Request model for creating a new graph. Example: - {'initial_entity': {'cik': '0001234567', 'name': 'Acme Corp', 'uri': 'https://acme.com'}, 'instance_tier': - 'kuzu-standard', 'metadata': {'description': 'Main production graph', 'graph_name': 'Production System', - 'schema_extensions': ['roboledger']}, 'tags': ['production', 'finance']} + {'initial_entity': {'cik': '0001234567', 'name': 'Acme Consulting LLC', 'uri': 'https://acmeconsulting.com'}, + 'instance_tier': 'kuzu-standard', 'metadata': {'description': 'Professional consulting services with full + accounting integration', 'graph_name': 'Acme Consulting LLC', 'schema_extensions': ['roboledger']}, 'tags': + ['consulting', 'professional-services']} Attributes: metadata (GraphMetadata): Metadata for graph creation. diff --git a/robosystems_client/models/cypher_query_request.py b/robosystems_client/models/cypher_query_request.py index b65f86a..982ca05 100644 --- a/robosystems_client/models/cypher_query_request.py +++ b/robosystems_client/models/cypher_query_request.py @@ -2,7 +2,6 @@ from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset @@ -20,15 +19,16 @@ class CypherQueryRequest: """Request model for Cypher query execution. Attributes: - query (str): The Cypher query to execute - parameters (Union['CypherQueryRequestParametersType0', None, Unset]): Optional parameters for the Cypher query + query (str): The Cypher query to execute. Use parameters ($param_name) for all dynamic values to prevent + injection attacks. + parameters (Union['CypherQueryRequestParametersType0', None, Unset]): Query parameters for safe value + substitution. ALWAYS use parameters instead of string interpolation. timeout (Union[None, Unset, int]): Query timeout in seconds (1-300) Default: 60. """ query: str parameters: Union["CypherQueryRequestParametersType0", None, Unset] = UNSET timeout: Union[None, Unset, int] = 60 - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: from ..models.cypher_query_request_parameters_type_0 import ( @@ -52,7 +52,7 @@ def to_dict(self) -> dict[str, Any]: timeout = self.timeout field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) + field_dict.update( { "query": query, @@ -108,21 +108,4 @@ def _parse_timeout(data: object) -> Union[None, Unset, int]: timeout=timeout, ) - cypher_query_request.additional_properties = d return cypher_query_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/schema_export_response.py b/robosystems_client/models/schema_export_response.py index dffd5fc..da700c2 100644 --- a/robosystems_client/models/schema_export_response.py +++ b/robosystems_client/models/schema_export_response.py @@ -24,10 +24,12 @@ class SchemaExportResponse: Attributes: graph_id (str): Graph ID - schema_definition (Union['SchemaExportResponseSchemaDefinitionType0', str]): Exported schema definition + schema_definition (Union['SchemaExportResponseSchemaDefinitionType0', str]): Exported schema definition (format + depends on 'format' parameter) format_ (str): Export format used exported_at (str): Export timestamp - data_stats (Union['SchemaExportResponseDataStatsType0', None, Unset]): Data statistics if requested + data_stats (Union['SchemaExportResponseDataStatsType0', None, Unset]): Data statistics if requested (only when + include_data_stats=true) """ graph_id: str diff --git a/robosystems_client/models/schema_info_response.py b/robosystems_client/models/schema_info_response.py new file mode 100644 index 0000000..527217c --- /dev/null +++ b/robosystems_client/models/schema_info_response.py @@ -0,0 +1,77 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.schema_info_response_schema import SchemaInfoResponseSchema + + +T = TypeVar("T", bound="SchemaInfoResponse") + + +@_attrs_define +class SchemaInfoResponse: + """Response model for runtime schema introspection. + + This model represents the actual current state of the graph database, + showing what node labels, relationship types, and properties exist right now. + + Attributes: + graph_id (str): Graph database identifier + schema (SchemaInfoResponseSchema): Runtime schema information showing actual database structure + """ + + graph_id: str + schema: "SchemaInfoResponseSchema" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + graph_id = self.graph_id + + schema = self.schema.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "graph_id": graph_id, + "schema": schema, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.schema_info_response_schema import SchemaInfoResponseSchema + + d = dict(src_dict) + graph_id = d.pop("graph_id") + + schema = SchemaInfoResponseSchema.from_dict(d.pop("schema")) + + schema_info_response = cls( + graph_id=graph_id, + schema=schema, + ) + + schema_info_response.additional_properties = d + return schema_info_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/robosystems_client/models/get_graph_schema_response_getgraphschema.py b/robosystems_client/models/schema_info_response_schema.py similarity index 76% rename from robosystems_client/models/get_graph_schema_response_getgraphschema.py rename to robosystems_client/models/schema_info_response_schema.py index 036899e..bf5551a 100644 --- a/robosystems_client/models/get_graph_schema_response_getgraphschema.py +++ b/robosystems_client/models/schema_info_response_schema.py @@ -4,12 +4,12 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="GetGraphSchemaResponseGetgraphschema") +T = TypeVar("T", bound="SchemaInfoResponseSchema") @_attrs_define -class GetGraphSchemaResponseGetgraphschema: - """ """ +class SchemaInfoResponseSchema: + """Runtime schema information showing actual database structure""" additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -22,10 +22,10 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - get_graph_schema_response_getgraphschema = cls() + schema_info_response_schema = cls() - get_graph_schema_response_getgraphschema.additional_properties = d - return get_graph_schema_response_getgraphschema + schema_info_response_schema.additional_properties = d + return schema_info_response_schema @property def additional_keys(self) -> list[str]: diff --git a/robosystems_client/models/schema_validation_response.py b/robosystems_client/models/schema_validation_response.py index 2a9238d..9dee137 100644 --- a/robosystems_client/models/schema_validation_response.py +++ b/robosystems_client/models/schema_validation_response.py @@ -25,12 +25,13 @@ class SchemaValidationResponse: Attributes: valid (bool): Whether the schema is valid message (str): Validation message - errors (Union[None, Unset, list[str]]): List of validation errors - warnings (Union[None, Unset, list[str]]): List of warnings - stats (Union['SchemaValidationResponseStatsType0', None, Unset]): Schema statistics (nodes, relationships, - properties) - compatibility (Union['SchemaValidationResponseCompatibilityType0', None, Unset]): Compatibility check results if - requested + errors (Union[None, Unset, list[str]]): List of validation errors (only present when valid=false) + warnings (Union[None, Unset, list[str]]): List of validation warnings (schema is still valid but has potential + issues) + stats (Union['SchemaValidationResponseStatsType0', None, Unset]): Schema statistics (only present when + valid=true) + compatibility (Union['SchemaValidationResponseCompatibilityType0', None, Unset]): Compatibility check results + (only when check_compatibility specified) """ valid: bool diff --git a/robosystems_client/models/table_query_request.py b/robosystems_client/models/table_query_request.py index 7207df4..a239c91 100644 --- a/robosystems_client/models/table_query_request.py +++ b/robosystems_client/models/table_query_request.py @@ -1,8 +1,10 @@ from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, Union, cast from attrs import define as _attrs_define +from ..types import UNSET, Unset + T = TypeVar("T", bound="TableQueryRequest") @@ -10,14 +12,27 @@ class TableQueryRequest: """ Attributes: - sql (str): SQL query to execute on staging tables + sql (str): SQL query to execute on staging tables. Use ? placeholders or $param_name for dynamic values to + prevent SQL injection. + parameters (Union[None, Unset, list[Any]]): Query parameters for safe value substitution. ALWAYS use parameters + instead of string concatenation. """ sql: str + parameters: Union[None, Unset, list[Any]] = UNSET def to_dict(self) -> dict[str, Any]: sql = self.sql + parameters: Union[None, Unset, list[Any]] + if isinstance(self.parameters, Unset): + parameters = UNSET + elif isinstance(self.parameters, list): + parameters = self.parameters + + else: + parameters = self.parameters + field_dict: dict[str, Any] = {} field_dict.update( @@ -25,6 +40,8 @@ def to_dict(self) -> dict[str, Any]: "sql": sql, } ) + if parameters is not UNSET: + field_dict["parameters"] = parameters return field_dict @@ -33,8 +50,26 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) sql = d.pop("sql") + def _parse_parameters(data: object) -> Union[None, Unset, list[Any]]: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + parameters_type_0 = cast(list[Any], data) + + return parameters_type_0 + except: # noqa: E722 + pass + return cast(Union[None, Unset, list[Any]], data) + + parameters = _parse_parameters(d.pop("parameters", UNSET)) + table_query_request = cls( sql=sql, + parameters=parameters, ) return table_query_request